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
| abstract class CustomColors with Diagnosticable{ | |
| const CustomColors(); | |
| CustomColors lerp(CustomColors other, double t); | |
| } | |
| class MyCustomColors implements CustomColors { | |
| const MyCustomColors({ this.foo, this.bar }); | |
| final Color foo; | |
| final Color bar; |
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/foundation.dart'; | |
| import 'package:flutter/material.dart'; | |
| // Enables sharing keyword value data with an entire app. | |
| // | |
| // AppModel.set(context, keyword, value) adds an entry to the shared data table. | |
| // | |
| // AppModel.get(context, keyword) returns the value for keyword or null. | |
| // | |
| // A widget whose build method uses AppModel.get(context, keyword) |
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
| return Scaffold( | |
| body: SignInForm( | |
| authentication: Authentication.OAuth, | |
| stateFeedbackBuilder: (state, ..) { | |
| if (state is SigningIn) return const CircularProgressIndicator(); | |
| if (state is AuthFailed) return ErrorText(state.exception); | |
| return null; | |
| }, | |
| providers: [ | |
| const ProviderButton<Google>(); |
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'; | |
| class Home extends StatefulWidget { | |
| const Home({ Key? key }) : super(key: key); | |
| @override | |
| _HomeState createState() => _HomeState(); | |
| } | |
| class _HomeState extends State<Home> { |
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'; | |
| class DemoRow extends StatelessWidget { | |
| DemoRow(this.alignment); | |
| final MainAxisAlignment alignment; | |
| @override | |
| Widget build(BuildContext context) { | |
| const List<Widget> items = <Widget>[ |
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
| /// Flutter code sample for AnimatedSize | |
| // This example makes a [Container] react to being touched, causing the child | |
| // of the [AnimatedSize] widget, here a [FlutterLogo], to animate. | |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(const MyApp()); | |
| /// This is the main application widget. |
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
| Hello world Hello world Hello world Hello world Hello world Hello world 0</br> | |
| Hello world Hello world Hello world Hello world Hello world Hello world 1</br> | |
| Hello world Hello world Hello world Hello world Hello world Hello world 2</br> | |
| Hello world Hello world Hello world Hello world Hello world Hello world 3</br> | |
| Hello world Hello world Hello world Hello world Hello world Hello world 4</br> | |
| Hello world Hello world Hello world Hello world Hello world Hello world 5</br> | |
| Hello world Hello world Hello world Hello world Hello world Hello world 6</br> | |
| Hello world Hello world Hello world Hello world Hello world Hello world 7</br> | |
| Hello world Hello world Hello world Hello world Hello world Hello world 8</br> | |
| Hello world Hello world Hello world Hello world Hello world Hello world 9</br> |
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
| // Copyright 2017 The Chromium Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that | |
| // can be found in the LICENSE file. | |
| import 'dart:async'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/scheduler.dart' show timeDilation; | |
| class StaggerAnimation extends StatelessWidget { |