This file contains 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:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:meta/meta.dart'; | |
Future<T> showModalBottomSheetApp<T>({ | |
@required BuildContext context, | |
@required WidgetBuilder builder, | |
}) { |
This file contains 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
class SomeWidgetState extends State<SomeWidget> { | |
@override | |
Widget build(BuildContext context) { | |
return new Scaffold(body: new LayoutBuilder(builder: _buildContent)); | |
} | |
Widget _buildContent(BuildContext context, BoxConstraints constraints) { | |
if (constraints.hasBoundedHeight) { | |
constraints = constraints.copyWith(maxHeight: constraints.maxHeight + |
This file contains 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:ui' as ui; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/widgets.dart'; | |
import 'package:flutter/animation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/scheduler.dart' show timeDilation; | |
class DemoPage extends StatefulWidget { | |
@override | |
_DemoPageState createState() => new _DemoPageState(); |
This file contains 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 Captured Error Reporting | |
/// Created by Simon Lightfoot | |
/// | |
/// Copyright (C) DevAngels Limited 2018 | |
/// License: APACHE 2.0 - https://www.apache.org/licenses/LICENSE-2.0 | |
/// | |
import 'dart:async'; | |
import 'dart:io'; | |
import 'dart:ui' as ui show window; |
This file contains 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'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:meta/meta.dart'; | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
This file contains 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(new MaterialApp( | |
home: Scaffold( | |
appBar: AppBar(title: new Text('Test')), | |
body: MyHome(), | |
), | |
)); | |
class MyHome extends StatelessWidget { |
This file contains 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
class MyHome extends StatelessWidget { | |
MyHome({Key key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Center( | |
child: RaisedButton( | |
child: Text('Click here'), | |
onPressed: () { | |
showDialog( |
This file contains 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/widgets.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(new BaselineExampleApp()); | |
class BaselineExampleApp extends StatelessWidget { | |
@override |
This file contains 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/rendering.dart'; | |
void main() { | |
runApp(new MyApp()); | |
debugPaintSizeEnabled = false; | |
} | |
class MyApp extends StatelessWidget { | |
@override |
OlderNewer