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
| void main(int userId){ | |
| print('hello $userId'); | |
| } |
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
| void main() { | |
| var a = takeHeavyObject(5000); | |
| var b = takeHeavyObject(5000); | |
| var iR = <int>[]; | |
| var iC = <int>[]; | |
| for (var i = 0; i < 20; i++) { | |
| iR.add(iter(a)); | |
| iC.add(cycle(b)); | |
| } |
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:convert'; | |
| void main() { | |
| final z = SomeClass( | |
| id: 0, name: 'Олег', progress: 123.22, createdAt: DateTime.now()); | |
| final jsonData = jsonEncode(z); | |
| final s = SomeClass.fromJson(jsonDecode(jsonData)); | |
| print(s.createdAt); | |
| } |
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/http.dart' as http; | |
| void main()async { | |
| await fetchAlbum().then(print); | |
| } | |
| Future<Object> fetchAlbum() { | |
| return http.get(Uri.parse('ddx-12021-9883fc3c.dev.ddxfitness.ru/users/check_qr?session_id=1&request_id=2&request_source=3&qr_code=DD2_1795122_45c16ccf_ZuFuxg=='), headers: { |
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:convert'; | |
| import 'dart:typed_data'; | |
| void main() { | |
| final inp = 'DD2_1582605_5d490bdd_ZtmB9Q=='; | |
| final String stamp = inp.split('_').last; | |
| final dec = base64Decode(stamp); | |
| final int secFromEpoch = int32bytes(dec); | |
| final time = DateTime.fromMillisecondsSinceEpoch(secFromEpoch * 1000); | |
| print(time.toUtc()); |
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
| void main() { | |
| final shittyResponseIter = { | |
| "data": [ | |
| {"name": 'Олег', 'id': 'xc'} | |
| ] | |
| }; | |
| final shittyResponseMap = { | |
| "data": [ | |
| {"name": 'Олег', 'id': 'xc'} | |
| ] |
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:async'; | |
| import 'dart:convert'; | |
| import 'dart:isolate'; | |
| typedef ParsedJson = Map<String, Object?>; | |
| class IsolatedJsonDecoder extends IsolatedJsonDecoderImplementation { | |
| static final IsolatedJsonDecoder instance = IsolatedJsonDecoder._internal(); | |
| factory IsolatedJsonDecoder() { |
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(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({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 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({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:convert'; | |
| import 'dart:typed_data'; | |
| void main() { | |
| final items = [ | |
| 'DDX_d979bdf8_ZYmCXg==', | |
| 'DDX_70f1633c_ZYly9w==', | |
| 'DDX_fc47a14c_ZYly/Q==', | |
| 'DDX_7b8ca1ea_ZYmCdQ==', | |
| 'DDX_5b93a84b_ZYlzLQ==', |
NewerOlder