This file contains hidden or 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
| /* | |
| * Dots Loading Indicator | |
| * https://gist.github.com/PlugFox/e486dcaf99d958973a1f1b1cddea789b | |
| * https://dartpad.dev?id=e486dcaf99d958973a1f1b1cddea789b | |
| * Mike Matiunin <[email protected]>, 14 October 2025 | |
| */ | |
| // ignore_for_file: curly_braces_in_flow_control_structures | |
| import 'dart:typed_data'; |
This file contains hidden or 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 SystemConfiguration.CaptiveNetwork | |
| struct NetworkHelper { | |
| /// Возвращает значение не равное nil только в случае если есть разрешение на доступ к геолокации. | |
| static func getWifiNameIfExists() -> String? { | |
| var ssid: String? | |
| if let interfaces = CNCopySupportedInterfaces() as? [String] { | |
| for interface in interfaces { | |
| if let networkInfo = CNCopyCurrentNetworkInfo(interface as CFString) as? [String: Any] { | |
| ssid = networkInfo[kCNNetworkInfoKeySSID as String] as? String |
This file contains hidden or 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
| // | |
| // BonjureService.swift | |
| // Playground | |
| // | |
| // Created by Андрей Дашкевич on 29.09.2025. | |
| // | |
| import Foundation | |
| import Network |
This file contains hidden or 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
| // | |
| // NetworkHelper.swift | |
| // Playground | |
| // | |
| // Created by Андрей Дашкевич on 07.10.2025. | |
| // | |
| import Foundation | |
| import Network | |
| import SystemConfiguration.CaptiveNetwork |
This file contains hidden or 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:http_middleware_client/http_middleware_client.dart'; | |
| class AppHttpClient extends HttpMiddlewareClient { | |
| AppHttpClient({super.client, super.middlewares}); | |
| } |
This file contains hidden or 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(App()); | |
| } | |
| class App extends StatelessWidget { | |
| const App({super.key}); | |
| @override |
This file contains hidden or 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:developer' as dev; | |
| import 'dart:async'; | |
| import 'package:flutter/foundation.dart'; | |
| import 'package:logging/logging.dart'; | |
| extension type AppLogger._(Logger _logger) { | |
| factory AppLogger.named(String name) => AppLogger._(Logger(name)); |
This file contains hidden or 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 Foundation | |
| // Пример: | |
| // Входная строка 'aabbbc' | |
| // Коды: | |
| // a (ASCII 97) -> 01 | |
| // b (ASCII 98) -> 1 | |
| // c (ASCII 99) -> 00 | |
| // Результат: 01 01 1 1 1 00 |
This file contains hidden or 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'; | |
| /// Слушает жизненный цикл активности и вызывает обратный вызов [onUpdate] каждый раз | |
| /// когда приложение возвращается из фонового состояния. | |
| /// | |
| /// Если приложение уходит в задний фон (свернули), а потом на передний (развернули) то вызывается | |
| /// обратный вызов [onUpdate]. | |
| mixin DeviceLifecycleStateMixin<Widget extends StatefulWidget> on State<Widget> { | |
| bool _appHided = false; |
NewerOlder