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 TextButtonTheme.fromColor({ Color color, Widget child }) { | |
| return TextButtonTheme( | |
| data: TextButtonThemeData( | |
| style: TextButton.styleFrom(primary: color), | |
| ), | |
| child: child, | |
| ); | |
| } |
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
| /* | |
| This examples defines a widget called "Destination" that displays two | |
| widgets in a column: an "icon" and a "label". The Destination widget's | |
| height is the height of the icon + the height of the label multiplied | |
| by the Destination's "progress" parameter, a value between 0 and 1. | |
| When progress is zero, the Destination's height is the same as the | |
| icon's height, and when progress is 1.0 the Destination's height is the | |
| sum of the icon and label's height | |
| Tapping on the demo animates the Destination's progress value. The |
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
| /* | |
| This example defines a widget called "Destination" that displays two | |
| widgets in a column: an "icon" and a "label". The Destination widget's | |
| height is the height of the icon + the height of the label multiplied | |
| by the Destination's "progress" parameter, a value between 0 and 1. | |
| When progress is zero, the Destination's height is the same as the | |
| icon's height, and when progress is 1.0 the Destination's height is the | |
| sum of the icon and label's height | |
| Tapping on the demo animates the Destination's progress value. The |
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 'dart:math' as math; | |
| import 'package:flutter/material.dart'; | |
| class Indicator extends StatefulWidget { | |
| Indicator({ Key key, this.link, this.offset }) : super(key: key); | |
| final LayerLink link; | |
| final Offset offset; |
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/scheduler.dart'; | |
| class DataTreeRule extends StatelessWidget { | |
| const DataTreeRule({ Key key }) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return Container( | |
| height: 2, |
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 ScaleFactorAppBar extends StatelessWidget { | |
| const ScaleFactorAppBar({ | |
| this.textScaleFactor = 1, | |
| this.textDirection = TextDirection.ltr, | |
| this.centerTitle = false, | |
| }); | |
| final double textScaleFactor; |
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(MaterialApp(home: MyHomePage())); | |
| } | |
| final TextEditingController controller = TextEditingController(); | |
| // It's possible to see the problem without using an EditableText subclass, | |
| // by just adding a print statement to _TextInputClientHandler in |