Created
          August 7, 2020 15:57 
        
      - 
      
- 
        Save tiagolpadua/dd50cae01b40eed50327e095071bd037 to your computer and use it in GitHub Desktop. 
    Annimation Challange
  
        
  
    
      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:bytebank/screens/transfer/list.dart'; | |
| import 'package:flutter/cupertino.dart'; | |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(BytebankApp()); | |
| class BytebankApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| theme: ThemeData( | |
| primaryColor: Colors.green[900], | |
| accentColor: Colors.blueAccent[700], | |
| buttonTheme: ButtonThemeData( | |
| buttonColor: Colors.blueAccent[700], | |
| textTheme: ButtonTextTheme.primary, | |
| ), | |
| ), | |
| home: Dashboard(), | |
| ); | |
| } | |
| } | |
| class Dashboard extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: Text('Dashboard'), | |
| ), | |
| body: Column( | |
| mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
| crossAxisAlignment: CrossAxisAlignment.start, | |
| children: <Widget>[ | |
| FutureBuilder<double>( | |
| initialData: 0.2, | |
| future: Future.delayed(Duration(microseconds: 100)) | |
| .then((value) => 1.0), | |
| builder: (context, snapshot) { | |
| debugPrint('${snapshot.data}'); | |
| return AnimatedOpacity( | |
| opacity: snapshot.data, | |
| curve: Curves.easeInCubic, | |
| duration: Duration(seconds: 2), | |
| child: Padding( | |
| padding: const EdgeInsets.all(8.0), | |
| child: Image.asset('images/bytebank_logo.png'), | |
| ), | |
| ); | |
| }, | |
| ), | |
| Padding( | |
| padding: const EdgeInsets.all(8.0), | |
| child: Container( | |
| // new code | |
| padding: EdgeInsets.all(8.0), | |
| height: 100, | |
| width: 150, | |
| color: Theme.of(context).primaryColor, | |
| child: Column( | |
| mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
| crossAxisAlignment: CrossAxisAlignment.start, | |
| children: <Widget>[ | |
| Icon( | |
| Icons.people, | |
| color: Colors.white, | |
| size: 24.0, | |
| ), | |
| Text( | |
| 'Contacts', | |
| style: TextStyle( | |
| color: Colors.white, | |
| fontSize: 16.0, | |
| ), | |
| ), | |
| ], | |
| ), | |
| ), | |
| ), | |
| ], | |
| ), | |
| ); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment