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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:sqlite3/common.dart'; | |
import '../src/database/types.dart'; | |
class SqlBuilder extends StatefulWidget { | |
const SqlBuilder({ | |
super.key, |
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:sqlite3/common.dart'; | |
import '../src/database/types.dart'; | |
class SqlBuilder extends StatefulWidget { | |
const SqlBuilder({ | |
super.key, |
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/services.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
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/services.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
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:shared_preferences/shared_preferences.dart'; | |
final class SharedPreferencesKeys { | |
static const action = 'action'; | |
} | |
void main() async { | |
final prefsWithCache = await SharedPreferencesWithCache.create( | |
cacheOptions: const SharedPreferencesWithCacheOptions( |
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' show ValueListenable; | |
import 'package:shared_preferences/shared_preferences.dart' | |
show SharedPreferences; | |
import 'package:flutter/material.dart'; | |
void main() async { | |
final counter = await SharedCounter.instance(); | |
runApp( | |
MaterialApp( | |
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
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( |
NewerOlder