RenderProxyBox
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/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@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 'dart:ui'; | |
typedef SomethingToString<T extends Object> = void Function(T); | |
class Foo extends Object { | |
const Foo(); | |
} | |
extension type Bar(Foo foo) {} |
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() async { | |
final futures = [ | |
for (var i = 0; i < 100000; ++i) Future.sync(DateTime.now), | |
]; | |
final dateTimes = await Future.wait(futures); | |
final delta = dateTimes.last.difference(dateTimes.first); | |
print(delta.inMilliseconds); | |
} |
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
/// https://codepen.io/sldsrg/pen/RwagmrL | |
import 'dart:async'; | |
import 'package:flutter/gestures.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
void main() { | |
runApp( | |
MaterialApp( |
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'; | |
abstract class Foo {} | |
class Bar implements Foo { | |
const Bar(); | |
} | |
class Baz implements Foo { | |
const Baz(); |
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(const NestedScrollViewExampleApp()); | |
class NestedScrollViewExampleApp extends StatelessWidget { | |
const NestedScrollViewExampleApp({super.key}); | |
@override | |
Widget build(context) => const MaterialApp( | |
home: NestedScrollViewExample(), |
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( | |
const MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: MyHomePage(), | |
), | |
); | |
class MyHomePage 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
import 'package:flutter/material.dart'; | |
abstract class MyImageUrls { | |
static const image = 'https://www.claerly.com/wrong/url.jpg'; | |
static const fallback = 'https://storage.googleapis.com/' | |
'cms-storage-bucket/65361d7e1dfa118aa63b.png'; | |
} | |
void main() => runApp( | |
MaterialApp( |
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:animations/animations.dart'; | |
import 'package:flutter/material.dart'; | |
typedef WidgetBuilderWithCallback = Widget Function( | |
BuildContext context, | |
VoidCallback callback, | |
); | |
void main() => runApp(const MaterialApp(home: ParallaxWidget())); |
NewerOlder