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(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override |
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:async'; | |
void main() { | |
// create stream that emit Completer, and wait it | |
((() async* { | |
try { | |
final completer = Completer<void>(); | |
yield completer; | |
await completer.future; | |
} catch (_) { |
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
{ | |
"v": "5.7.14", | |
"fr": 25, | |
"ip": 0, | |
"op": 132, | |
"w": 1920, | |
"h": 1080, | |
"nm": "glass only render", | |
"ddd": 0, | |
"assets": [ |
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'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatefulWidget { | |
const MyApp({super.key}); |
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:async'; | |
import 'package:flutter_test/flutter_test.dart'; | |
void main() { | |
test('test case', () async { | |
await expectLater( | |
// create stream that emit Completer, and wait it | |
((() async* { | |
try { |
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() { | |
final originalTextStyle = TextStyle( | |
package: 'myFontPack', | |
fontFamily: 'myFontFamily', | |
fontFamilyFallback: ['myFontFamilyFallback'], | |
); | |
print(originalTextStyle.fontFamilyFallback); // [packages/myFontPack/myFontFamilyFallback] |
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
void main() { | |
var a = const ImmutablePoint(1, 1); | |
var b = const ImmutablePoint(1, 1); | |
var c = ImmutableCircle(); | |
var d = ImmutableCircle(); | |
print(identical(a, b)); | |
print(identical(c, d)); | |
} |
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() async { | |
runApp( | |
MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: Container( | |
color: Color(0xFF15202D), | |
child: SizedBox.expand( |
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 | Element | Render Object | | |
|----------|--------------------------------|---------------------| | |
| Center | SingleChildRenderObjectElement | RenderPositionedBox | | |
| Text | StatelessElement | | | |
| RichText | MultiChildRenderObjectElement | RenderParagraph | |
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(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
NewerOlder