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
/* | |
* Побитовое хранилище int и bool | |
* https://gist.github.com/PlugFox/13363e58a2f8a454a518444a90282825 | |
* https://dartpad.dartlang.org/13363e58a2f8a454a518444a90282825 | |
*/ | |
/* | |
+------------------------- | |
| ВЫВОД // |
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
/////////////////////////////////////////////////////////////// | |
/// Sample nested BLoCs architecture with singltone repository | |
/// https://felangel.github.io/bloc/#/gettingstarted | |
/// https://gist.github.com/PlugFox/99c6118789c4bbc7d04690f5ca93ee21 | |
/// https://dartpad.dartlang.org/99c6118789c4bbc7d04690f5ca93ee21 | |
/////////////////////////////////////////////////////////////// | |
import 'dart:async'; | |
import 'dart:math' as m show Random; // Нужен только в примере, для представления провайдеров | |
/* | |
import 'package:flutter_bloc/flutter_bloc.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
/* | |
* Демонстрация реактивного программирования для https://t.me/rudart | |
* https://gist.github.com/PlugFox/6e79a1f5cc6e32a4df1081bd27edb38c | |
* https://dartpad.dartlang.org/6e79a1f5cc6e32a4df1081bd27edb38c | |
*/ | |
import 'dart:async'; | |
class MyString { | |
final StreamController<String> _sc = new StreamController<String>.broadcast(); |
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
/* | |
* Title register in dart for https://t.me/rudart | |
* https://gist.github.com/PlugFox/973fdcaa9f49613ec4b57aaea0a60b5d | |
* https://dartpad.dartlang.org/973fdcaa9f49613ec4b57aaea0a60b5d | |
*/ | |
String toTitleRegister(String string) => | |
string | |
.split(RegExp(r'\s')) | |
.map<String>((String val) |
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
/* json example mapping for https://t.me/rudart */ | |
import "dart:math"; | |
import "dart:convert"; | |
void main() { | |
String raw = ''' | |
{"rooms": [ | |
{ | |
"id": "49", |
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
/* | |
* Пример парсинга json с использованием каскадной нотации | |
* для https://t.me/rudart | |
* https://gist.github.com/PlugFox/0f4c182950895f7033d26204911dad6a/ | |
* https://dartpad.dartlang.org/0f4c182950895f7033d26204911dad6a | |
*/ | |
// Описание каскадной нотации: | |
// https://dart.dev/guides/language/language-tour#cascade-notation- |
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
The MIT License | |
Copyright (c) 2019 Plague Fox | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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://gist.github.com/PlugFox/18826a7169a6ea632d51c665cc7357e1 | |
https://dartpad.dartlang.org/18826a7169a6ea632d51c665cc7357e1 | |
*/ | |
// A | |
class A { | |
final int _value; | |
int get value => this._value; | |
A([int value]) |
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://gist.github.com/PlugFox/a013510572bb2115d6ac2e434cb8d197 | |
https://dartpad.dartlang.org/a013510572bb2115d6ac2e434cb8d197 | |
*/ | |
import 'dart:html'; // for _LocalProviderStorage | |
abstract class Repository { | |
static final RepositoryProvider _repository = RepositoryProvider(); |
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
/* | |
Repository realisation in dart | |
https://gist.github.com/PlugFox/bb2cf58f199886cc0971d75a3e337b6a | |
https://dartpad.dartlang.org/bb2cf58f199886cc0971d75a3e337b6a | |
*/ | |
import 'dart:async'; | |
// Repository controller | |
abstract class Repository { | |
static final RepositoryProvider _repository = RepositoryProvider(); |