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
/* | |
* Пример обмена данными между клиентом и сервером по протоколу TCP/IP | |
* https://gist.github.com/PlugFox/9cc2adb1d8df24fae2164e95dba6a911 | |
* https://dartpad.dev?id=9cc2adb1d8df24fae2164e95dba6a911 | |
* Matiunin Mikhail <plugfox@gmail.com>, 29 October 2023 | |
*/ | |
// ignore_for_file: avoid_print, lines_longer_than_80_chars | |
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
/* | |
* Sequential Cubit | |
* https://gist.github.com/PlugFox/a183c3c804a3369efe8ad3584f0550ac | |
* https://dartpad.dev?id=a183c3c804a3369efe8ad3584f0550ac | |
* Matiunin Mikhail <plugfox@gmail.com>, 15 February 2024 | |
*/ | |
import 'dart:async'; | |
import 'dart:collection'; |
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
/* | |
* Sunflower | |
* https://gist.github.com/PlugFox/9d251f3300804746884e2c2f8824babb | |
* https://dartpad.dev?id=9d251f3300804746884e2c2f8824babb | |
* Mike Matiunin <plugfox@gmail.com>, 06 March 2024 | |
*/ | |
import 'dart:async'; | |
import 'dart:math' as math; |
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
Show hidden characters
{ /// cntrl + shift + p -> Preferences: Configure User Snippets | |
/// `global.code-snippets` | |
/// https://code.visualstudio.com/docs/editor/userdefinedsnippets | |
/// https://github.com/microsoft/vscode/blob/main/src/vs/editor/contrib/snippet/browser/snippet.md | |
/// snippet revision 1 | |
/// type state in feature_state.dart file | |
"BLoC|Cont Controller or Bloc": { | |
"scope": "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
import 'package:mio/src/common/utils/formatter/text_formatter.dart'; | |
import 'package:mio/src/common/utils/text_utils.dart'; | |
/// mask | |
controller: TextEditingController( | |
text: TextUtils.maskPhone( | |
contacts[numberOfContact].businessManagerPhone)), | |
/// unmask |
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
/// Вытащить первые две буквы первого слова, на любом языке, где это возможно | |
/// Если буква лишь одна то вернуть Букву и точку | |
/// Если нет совпадений вернуть 'un.' | |
/// Если строка null вернуть 'un.' | |
/// [capitalize] - если true то вернуть в верхнем регистре | |
String extractFirstTwoLetter(String? input, {bool capitalize = false}) { | |
var result = 'un.'; //undefined | |
if (input == null) return result; | |
/// Позволяет взять любую букву любого алфавита |
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
{ | |
"@@locale": "ru", | |
"language": "Русский язык", | |
"c10_Other": "Прочее", | |
"c10_Logout": "Выход", | |
"@c10_Logout": { | |
"description": "Логаут из аккаунта, после него требуется авторизация" | |
}, | |
"c10_RequiredToFill": "Требуется заполнить", | |
"@c10_RequiredToFill": { |
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:isolate'; | |
import 'package:dio/dio.dart'; | |
//... few more imports | |
import '../database_system/system_database.dart'; | |
import '../logger/l.dart'; | |
class BackgroundTask { | |
BackgroundTask({ |
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
// Copyright 2014 The Flutter Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
import 'dart:convert'; | |
import 'dart:isolate'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; |
NewerOlder