Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added animation of file called "IdK" but it does not shows on app #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/Screens/SplashScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'package:lottie/lottie.dart';
import 'package:get/get.dart';

class SplashScreen extends StatefulWidget {
const SplashScreen({super.key});

@override
_SplashScreenState createState() => _SplashScreenState();
}
Expand All @@ -16,7 +18,7 @@ class _SplashScreenState extends State<SplashScreen> {
// Delay the navigation to the HomeScreen after 2 seconds
Future.delayed(const Duration(seconds: 2), () {
// Use Get.off to replace the current screen with MyHomePage
Get.off(() => MyHomePage());
Get.off(() => const MyHomePage());
});
}

Expand Down
10 changes: 5 additions & 5 deletions lib/Screens/animated_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class _AnimatedDialogState extends State<AnimatedDialog> {
width: 300,
padding: const EdgeInsets.all(20),
color: Colors.white,
child: Column(
child: const Column(
mainAxisSize: MainAxisSize.min,
children: [
Text('Hello!!'),
Expand All @@ -67,15 +67,15 @@ class _AnimatedDialogState extends State<AnimatedDialog> {
backgroundColor: Colors.cyan,
shape: OutlineInputBorder(
borderRadius: BorderRadius.circular(16.0)),
title: Text('Animated Dialog Example'),
content: Text('Github: Imsurajr'),
title: const Text('Animated Dialog Example'),
content: const Text('Github: Imsurajr'),
),
);
},
transitionDuration: Duration(milliseconds: 300),
transitionDuration: const Duration(milliseconds: 300),
);
},
child: Text('Show Dialog'),
child: const Text('Show Dialog'),
),
),
);
Expand Down
24 changes: 12 additions & 12 deletions lib/Screens/bounce_animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ class _BounceState extends State<Bounce> {
children: [
// bounceInOut
TweenAnimationBuilder(
child: const CircleAvatar(
radius: 60,
backgroundColor: Colors.greenAccent,
),
duration: const Duration(milliseconds: 6000),
curve: Curves.bounceInOut,
tween: Tween(begin: 1.0, end: 0.0),
Expand All @@ -66,17 +62,17 @@ class _BounceState extends State<Bounce> {
child: child,
);
},
child: const CircleAvatar(
radius: 60,
backgroundColor: Colors.greenAccent,
),
),
const SizedBox(height: 20,),

//bounceOut


TweenAnimationBuilder(
child: const CircleAvatar(
radius: 60,
backgroundColor: Colors.redAccent,
),
duration: const Duration(milliseconds: 6000),
curve: Curves.bounceOut,
tween: Tween(begin: 1.0, end: 0.0),
Expand All @@ -89,14 +85,14 @@ class _BounceState extends State<Bounce> {
child: child,
);
},
child: const CircleAvatar(
radius: 60,
backgroundColor: Colors.redAccent,
),
),
const SizedBox(height: 20,),

TweenAnimationBuilder(
child: const CircleAvatar(
radius: 60,
backgroundColor: Colors.yellowAccent,
),
duration: const Duration(milliseconds: 6000),
curve: Curves.bounceIn,
tween: Tween(begin: 1.0, end: 0.0),
Expand All @@ -110,6 +106,10 @@ class _BounceState extends State<Bounce> {
child: child,
);
},
child: const CircleAvatar(
radius: 60,
backgroundColor: Colors.yellowAccent,
),
),
const SizedBox(height: 20,),

Expand Down
2 changes: 1 addition & 1 deletion lib/Screens/colorize_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ class _colorize_text extends State<colorize_text> {
),
);
}
}
}
2 changes: 1 addition & 1 deletion lib/Screens/explicit_animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class _ExplicitAnimationsState extends State<ExplicitAnimations>

},

icon: Icon(Icons.refresh_rounded))
icon: const Icon(Icons.refresh_rounded))
],
backgroundColor: mainpagecolor,
title: const Text('explicit animation'),
Expand Down
2 changes: 2 additions & 0 deletions lib/Screens/flip_counter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import '../controllers/drawercontroller.dart';


class flip extends StatefulWidget {
const flip({super.key});

@override
_flipState createState() => _flipState();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Screens/hero_animation/details_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
class DetailPage extends StatelessWidget {
final int index;

const DetailPage({required this.index});
const DetailPage({super.key, required this.index});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 1 addition & 3 deletions lib/Screens/hero_animation/master_page.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_animations/Screens/hero_animation/details_page.dart';
import 'package:flutter_animations/widgets/customAppBar.dart';
import '../../controllers/drawercontroller.dart';
import '../../helpers/colors.dart';

class HeroAnimation extends StatelessWidget {
const HeroAnimation({super.key});
Expand All @@ -11,7 +9,7 @@ class HeroAnimation extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(

appBar: CustomAppBar( title: 'Hero-animation',),
appBar: const CustomAppBar( title: 'Hero-animation',),

body: ListView.builder(itemBuilder: (context, index) {
return ListTile(
Expand Down
2 changes: 2 additions & 0 deletions lib/Screens/homepage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import '../controllers/drawercontroller.dart';
import 'menuscreen.dart';

class MyHomePage extends GetView<MyDrawerController> {
const MyHomePage({super.key});

@override
Widget build(BuildContext context) {
return GetBuilder<MyDrawerController>(
Expand Down
100 changes: 100 additions & 0 deletions lib/Screens/iiiidk.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import 'package:flutter/material.dart';
import 'package:flutter_animations/helpers/colors.dart';
import '../controllers/drawercontroller.dart';

class IdK extends StatefulWidget {
const IdK({super.key});

@override
State<IdK> createState() => _IdK();
}

// The State class is responsible for two things: holding some data you can
// update and building the UI using that data.
class _IdK extends State<IdK> with SingleTickerProviderStateMixin {
late AnimationController _controller;
late Animation<double> _scaleAnimation;
late Animation<Offset> _slideAnimation;
bool _visible = true;

@override
void initState() {
super.initState();
_controller = AnimationController(
duration: const Duration(milliseconds: 500),
vsync: this,
);

_scaleAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
CurvedAnimation(
parent: _controller,
curve: Curves.easeIn,
),
);

_slideAnimation = Tween<Offset>(begin: const Offset(0, 1), end: Offset.zero).animate(
CurvedAnimation(
parent: _controller,
curve: Curves.easeInOut,
),
);
}

@override
void dispose() {
_controller.dispose();
super.dispose();
}

void toggleVisibility() {
setState(() {
_visible = !_visible;
if (_visible) {
_controller.reverse();
} else {
_controller.forward();
}
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: mainpagecolor,
appBar: AppBar(
backgroundColor: mainpagecolor,
title: const Text('hello'),
leading: IconButton(
icon: const Icon(Icons.menu), // You can use any icon you prefer
onPressed: () {
MyDrawerController.to.toggleDrawer();
MyDrawerController.to.update();
},
hoverColor: Colors.white,
),
elevation: 0,
),
body: Center(
child: SlideTransition(
position: _slideAnimation,
child: ScaleTransition(
scale: _scaleAnimation,
child: Container(
width: 200,
height: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.0),
color: Colors.blue,
),
),
),
),
),
floatingActionButton: FloatingActionButton(
onPressed: toggleVisibility,
tooltip: 'Toggle Scale & Slide',
child: const Icon(Icons.flip),
),
);
}
}
2 changes: 1 addition & 1 deletion lib/Screens/loading_animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class _loadingAnimation extends State<loadingAnimation> {
),
elevation: 0,
),
body: Center(
body: const Center(
child: RadialProgressAnimation(
progress: 0.86,
color: Colors.orange,
Expand Down
3 changes: 1 addition & 2 deletions lib/Screens/menuscreen.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:flutter_animations/helpers/colors.dart';
Expand All @@ -9,7 +8,7 @@ import '../controllers/drawercontroller.dart';
class MenuScreen extends GetView<MyDrawerController> {
final Function(int) onMenuItemClicked;

MenuScreen({required this.onMenuItemClicked});
MenuScreen({super.key, required this.onMenuItemClicked});

// Menu items for illustration
final List<String> menuItems = [
Expand Down
6 changes: 3 additions & 3 deletions lib/Screens/water_drop_effect.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class WaterDropEffect extends StatelessWidget {
backgroundColor: mainpagecolor,
appBar: AppBar(
backgroundColor: mainpagecolor,
title: Text('Water Drop Effect'),
title: const Text('Water Drop Effect'),
leading: IconButton(
icon: Icon(Icons.menu), // You can use any icon you prefer
icon: const Icon(Icons.menu), // You can use any icon you prefer
onPressed:() {
MyDrawerController.to.toggleDrawer();
MyDrawerController.to.update();
Expand Down Expand Up @@ -117,7 +117,7 @@ class WaterDropEffect extends StatelessWidget {
BoxShadow(
color: Colors.white,
blurRadius: 5,
offset: const Offset(5, 6),
offset: Offset(5, 6),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/Text/move_udlr_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
class AnimatedTextWidget2 extends StatefulWidget {
final String animationType;

AnimatedTextWidget2({required this.animationType});
const AnimatedTextWidget2({super.key, required this.animationType});

@override
_AnimatedTextWidgetState2 createState() => _AnimatedTextWidgetState2();
Expand Down
10 changes: 6 additions & 4 deletions lib/Text/tex_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import 'package:flutter_animations/helpers/colors.dart';
import 'package:flutter_animations/widgets/customAppBar.dart';

class AnimatedTextWidget extends StatefulWidget {
const AnimatedTextWidget({super.key});

@override
_AnimatedTextWidgetState createState() => _AnimatedTextWidgetState();
}
Expand Down Expand Up @@ -52,7 +54,7 @@ class _AnimatedTextWidgetState extends State<AnimatedTextWidget>
context,
MaterialPageRoute(
builder: (context) =>
AnimatedTextWidget2(
const AnimatedTextWidget2(
animationType: 'up')));
},
child: const Text('UP')),
Expand All @@ -65,7 +67,7 @@ class _AnimatedTextWidgetState extends State<AnimatedTextWidget>
context,
MaterialPageRoute(
builder: (context) =>
AnimatedTextWidget2(
const AnimatedTextWidget2(
animationType: 'down')));
},
child: const Text('Down')),
Expand All @@ -79,7 +81,7 @@ class _AnimatedTextWidgetState extends State<AnimatedTextWidget>
context,
MaterialPageRoute(
builder: (context) =>
AnimatedTextWidget2(
const AnimatedTextWidget2(
animationType: 'right')));
},
child: const Text('Right')),
Expand All @@ -92,7 +94,7 @@ class _AnimatedTextWidgetState extends State<AnimatedTextWidget>
context,
MaterialPageRoute(
builder: (context) =>
AnimatedTextWidget2(
const AnimatedTextWidget2(
animationType: 'left')));
},
child: const Text('left')),
Expand Down
Loading