Skip to content

Instantly share code, notes, and snippets.

@arnold-parge
Last active January 22, 2020 10:44
Show Gist options
  • Save arnold-parge/1e98e9cdc26b2cd46a44c122560a1885 to your computer and use it in GitHub Desktop.
Save arnold-parge/1e98e9cdc26b2cd46a44c122560a1885 to your computer and use it in GitHub Desktop.
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',
),
),
),
),
);
}
}
@arnold-parge
Copy link
Author

arnold-parge commented Jan 22, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment