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/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'Squircle', |
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'; | |
/// Displays an overlay Widget anchored directly above the center of this | |
/// [AnchoredOverlay]. | |
/// | |
/// The overlay Widget is created by invoking the provided [overlayBuilder]. | |
/// | |
/// The [anchor] position is provided to the [overlayBuilder], but the builder | |
/// does not have to respect it. In other words, the [overlayBuilder] can | |
/// interpret the meaning of "anchor" however it wants - the overlay will not |
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:io'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/foundation.dart' | |
show debugDefaultTargetPlatformOverride; | |
void main() { | |
debugDefaultTargetPlatformOverride = TargetPlatform.android; | |
_setTargetPlatformForDesktop(); | |
runApp($MyApp$()); |
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 MyApp()); | |
class MyApp extends StatelessWidget { | |
/// Use these booleans to see how each approach works, use the one that fits your needs | |
/// *** For some strange reason HotReload is not responding to changes in these bools | |
/// but if you use HotRestart then it's fine. |
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(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
theme: ThemeData.dark(), | |
home: Scaffold( |
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 MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
theme: ThemeData.dark(), | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text('Deep Dive Testing'), | |
backgroundColor: Colors.blue, | |
), |
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
final Widget render_constrained_box_object_was_given_an_infinite_size_during_layout = | |
Column( | |
children: <Widget>[ | |
Row( | |
children: <Widget>[ | |
Container( | |
child: SizedBox( | |
height: double.infinity, | |
), | |
), |
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
Expanded({ | |
Key key, | |
int flex = 1, | |
@required Widget child, | |
}) : super( | |
key: key, | |
flex: flex, | |
fit: FlexFit.tight, | |
child: child, | |
); |
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
Widget brokenCodeRenderFlexError = | |
Column( | |
/// A Column's default is "mainAxisSize: MainAxisSize.max," | |
/// This means it will try to take all the height it's allowed to. | |
children: <Widget>[ | |
Container( | |
height: 300, | |
width: double.infinity, | |
color: Colors.red, | |
), |
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
void main() { | |
runApp( | |
Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
Flexible( | |
fit: FlexFit.loose, | |
child: Container( | |
color: Colors.blue, | |
height: 100, |
OlderNewer