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:collection'; | |
import 'dart:convert'; | |
import 'dart:typed_data'; | |
import 'package:collection/collection.dart'; | |
import 'package:crypto/crypto.dart'; | |
import 'package:meta/meta.dart'; | |
/// Токен JWT состоит из трех частей: заголовка (header), полезной нагрузки (payload) и подписи или данных шифрования. | |
/// Первые два элемента — это JSON объекты определенной структуры. |
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() => Future<void>(() async { | |
final stream = Stream<int>.fromIterable([1, 2, 3]).map<String>((v) { | |
print(v); | |
return v.toString(); | |
}).asBroadcastStream(); | |
await for (final _ in stream) { | |
print('+'); | |
} |
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://dartpad.dev/f7bf20058ce237d669f4b56fe6e44186 | |
import 'package:flutter/material.dart'; | |
void main() => runApp(App()); | |
class App extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) => const MaterialApp( | |
title: 'FORM DATA', | |
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
/// | |
abstract class Validator { | |
Validator._(); | |
/// Выполнить проверку на полное соответсвие | |
static bool validate(String source, String pattern) => | |
RegExp(pattern).hasMatch(source); | |
/// Номер кредитки | |
static bool creditCard(String source) => |
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'; | |
import 'sizer.dart'; | |
class AdaptiveWidget extends StatefulWidget { | |
const AdaptiveWidget({ | |
required this.compactChild, | |
required this.extendedChild, | |
this.alignment = Alignment.center, | |
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:ui' as ui show FragmentProgram, FragmentShader; | |
import 'package:agora_app/theme_audo/theme.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/scheduler.dart'; | |
/// {@template card} | |
/// A Card widget. | |
/// {@endtemplate} |
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:collection/collection.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:m10/features/transfer_linked_card/model/transfer_linked_card_model.dart'; | |
/// interface | |
@immutable | |
abstract class UserCardsState { | |
const UserCardsState({ | |
required this.userCards, | |
}); |
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:themegen_annotation/themegen_annotation.dart'; | |
part 'example.g.dart'; | |
@ThemeGen( | |
extensions: { | |
_$AppColorsLight, | |
_$AppFontStylesLight, | |
}, |
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'; | |
class NoTransitionPage extends Page<Object> { | |
const NoTransitionPage({ | |
required this.child, | |
this.fullscreenDialog = false, | |
this.maintainState = true, | |
this.barrierColor, | |
this.barrierLabel, | |
}); |