Last active
January 22, 2020 10:44
-
-
Save arnold-parge/1e98e9cdc26b2cd46a44c122560a1885 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| title: 'Flutter Demo', | |
| debugShowCheckedModeBanner: false, | |
| theme: ThemeData( | |
| primarySwatch: Colors.green, | |
| ), | |
| home: MyHomePage(title: 'Shweta vedi ahe...'), | |
| ); | |
| } | |
| } | |
| class MyHomePage extends StatefulWidget { | |
| MyHomePage({Key key, this.title}) : super(key: key); | |
| final String title; | |
| @override | |
| _MyHomePageState createState() => _MyHomePageState(); | |
| } | |
| class _MyHomePageState extends State<MyHomePage> { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: Text(widget.title), | |
| ), | |
| body: Center( | |
| child: FloatingActionButton( | |
| onPressed: () { | |
| Navigator.of(context) | |
| .push(MaterialPageRoute(builder: (context) => SettingPage())); | |
| }, | |
| tooltip: 'Increment', | |
| child: Icon(Icons.photo), | |
| ), | |
| ), | |
| ); | |
| } | |
| } | |
| class SettingPage extends StatefulWidget { | |
| SettingPage(); | |
| @override | |
| _SettingPageState createState() => _SettingPageState(); | |
| } | |
| class _SettingPageState extends State<SettingPage> | |
| with TickerProviderStateMixin { | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: Text('HORSEEE'), | |
| ), | |
| body: Center( | |
| child: ScaleTransition( | |
| scale: AnimationController( | |
| duration: const Duration(milliseconds: 2000), | |
| vsync: this, | |
| value: 0.2, | |
| )..forward(), | |
| child: RotationTransition( | |
| turns: AnimationController( | |
| duration: const Duration(milliseconds: 2000), | |
| vsync: this, | |
| value: 0.2, | |
| )..forward(), | |
| child: Image.network( | |
| 'https://www.finishlinehorse.com/wp-content/uploads/2014/09/teeth_1711_660993_0_14104944_500.jpg', | |
| ), | |
| ), | |
| ), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created a sample to check how https://dartpad.dev works:
https://dartpad.dev/1e98e9cdc26b2cd46a44c122560a1885