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
| SnackBar({ | |
| Key key, | |
| @required this.content, | |
| this.backgroundColor, | |
| this.action, | |
| this.duration = _kSnackBarDisplayDuration, | |
| this.animation, | |
| }) |
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
| final bar = _snackSample(); | |
| _key.currentState.showSnackBar(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
| Widget _snackSample() => SnackBar( | |
| content: Text( | |
| "You have a message!", | |
| style: TextStyle( | |
| color: TEXT_BLACK, | |
| fontSize: 20, | |
| ), | |
| textAlign: TextAlign.center, | |
| ), | |
| backgroundColor: BLUE_LIGHT, |
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"; | |
| import 'package:flutter_widgets/const/_const.dart'; | |
| class SnackPage extends StatefulWidget { | |
| @override | |
| _SnackState createState() => _SnackState(); | |
| } | |
| class _SnackState extends State<SnackPage> { | |
| GlobalKey<ScaffoldState> _key = GlobalKey(); |
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
| Widget _alertDialog() => AlertDialog( | |
| title: Text( | |
| "How to follow us?", | |
| textAlign: TextAlign.center, | |
| ), | |
| titleTextStyle: TextStyle( | |
| color: TEXT_BLACK, fontSize: 30, fontWeight: FontWeight.w700), | |
| titlePadding: EdgeInsets.symmetric(horizontal: 30, vertical: 20), | |
| content: Text("1. You should login in the facebook.\n" | |
| "2. You should search the Flutter Open.\n" |
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
| AlertDialog({ | |
| Key key, | |
| this.title, | |
| this.titlePadding, | |
| this.titleTextStyle, | |
| this.content, | |
| this.contentPadding = const EdgeInsets.fromLTRB(24.0, 20.0, 24.0, 24.0), | |
| this.contentTextStyle, | |
| this.actions, | |
| this.backgroundColor, |
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
| Widget _shapeDialog() => SimpleDialog( | |
| title: Text( | |
| "Be careful!", | |
| textAlign: TextAlign.center, | |
| ), | |
| children: <Widget>[ | |
| Text( | |
| "If you write a message, you should care about the message.", | |
| textAlign: TextAlign.center, | |
| ), |
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
| Widget _colorDialog() => SimpleDialog( | |
| title: Text( | |
| "Message", | |
| textAlign: TextAlign.center, | |
| ), | |
| children: <Widget>[ | |
| Text( | |
| "You must learn it carefully.", | |
| textAlign: TextAlign.center, | |
| ), |
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
| Widget _padDialog() => SimpleDialog( | |
| title: Text( | |
| "Do you know why?", | |
| textAlign: TextAlign.center, | |
| ), | |
| titlePadding: EdgeInsets.symmetric( | |
| horizontal: 30, | |
| vertical: 20, | |
| ), | |
| children: <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
| SimpleDialog({ | |
| Key key, | |
| this.title, | |
| this.titlePadding = const EdgeInsets.fromLTRB(24.0, 24.0, 24.0, 0.0), | |
| this.children, | |
| this.contentPadding = const EdgeInsets.fromLTRB(0.0, 12.0, 0.0, 16.0), | |
| this.backgroundColor, | |
| this.elevation, | |
| this.semanticLabel, | |
| this.shape, |