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
/* | |
* Mutex benchmark | |
* https://gist.github.com/PlugFox/264d59a37d02dd06a7123ef19ee8537d | |
* https://dartpad.dev?id=264d59a37d02dd06a7123ef19ee8537d | |
* Mike Matiunin <[email protected]>, 11 November 2024 | |
*/ | |
import 'dart:async'; | |
import 'dart:collection'; | |
import 'dart:isolate'; |
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
/* | |
* Completer throws an error to the zone. | |
* https://gist.github.com/PlugFox/675bdaf8ae604989e1dc7959abddbfd5 | |
* https://dartpad.dev?id=675bdaf8ae604989e1dc7959abddbfd5 | |
* Mike Matiunin <[email protected]>, 07 November 2024 | |
*/ | |
// ignore_for_file: cascade_invocations, avoid_print | |
import 'dart:async'; |
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
/* | |
* Сортировка чисел от 10 до 100 по их русскому текстовому представлению | |
* https://gist.github.com/PlugFox/cf41859c3c03fb8ee4ae1e8fd1de81f1 | |
* https://dartpad.dev?id=cf41859c3c03fb8ee4ae1e8fd1de81f1 | |
* Mike Matiunin <[email protected]>, 25 October 2024 | |
*/ | |
const units = [ | |
'ноль', | |
'один', |
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
/* | |
* Sort numbers from 10 to 100 by their English word representation | |
* https://gist.github.com/PlugFox/80541bd650f17a0796780f7f953a1dda | |
* https://dartpad.dev?id=80541bd650f17a0796780f7f953a1dda | |
* Mike Matiunin <[email protected]>, 25 October 2024 | |
*/ | |
const units = [ | |
'zero', | |
'one', |
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
// ignore_for_file: avoid_positional_boolean_parameters | |
/* | |
* Horizontal PageView with Hero Animation | |
* https://gist.github.com/PlugFox/a977312dbe79c830f77306c2185064c1 | |
* https://dartpad.dev/?id=a977312dbe79c830f77306c2185064c1 | |
* Mike Matiunin <[email protected]>, 24 October 2024 | |
*/ | |
import 'dart:async'; |
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:ui/src/theme/extensions/typography.dart'; | |
/// Helper widget to display text with the App's typography. | |
/// | |
/// https://docs.flutter.dev/ui/design/text/typography | |
/// https://m3.material.io/styles/typography/overview | |
/// https://api.flutter.dev/flutter/material/Typography-class.html | |
/// https://api.flutter.dev/flutter/widgets/Text-class.html | |
class AppText 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:meta/meta.dart'; | |
void main() { | |
final now = DateTime.now(); | |
print(now.toIso8601String()); | |
print(Date.from(now).toIso8601String()); | |
print((Date.from(now) as DateTime).toIso8601String()); | |
} | |
extension type Date.from(DateTime _dt) implements DateTime { |
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
/* | |
* Custom layout with Flutter | |
* https://gist.github.com/PlugFox/8dbafc696927ab7111d03250cc01b712 | |
* https://dartpad.dev?id=8dbafc696927ab7111d03250cc01b712 | |
* Mike Matiunin <[email protected]>, 22 September 2024 | |
*/ | |
import 'dart:math' as math; | |
import 'package:flutter/material.dart'; |
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
/* | |
* Behavior distinct | |
* https://gist.github.com/PlugFox/d2afc6bd33c138e9ef0e6c74f405c779 | |
* https://dartpad.dev?id=d2afc6bd33c138e9ef0e6c74f405c779 | |
* Mike Matiunin <[email protected]>, 27 August 2024 | |
*/ | |
// ignore_for_file: avoid_print | |
import 'dart:async'; |
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'; | |
import 'dart:math' as math; | |
class CustomLayout extends MultiChildRenderObjectWidget { | |
CustomLayout({ | |
Key key, | |
List<Widget> children = const <Widget>[], | |
}) : super(key: key, children: children); |
NewerOlder