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
{ | |
"status": 200, | |
"features": { | |
"add_new_address_flow": { | |
"defaultValue": true | |
}, | |
"disable_print_receipt": { | |
"defaultValue": true | |
}, | |
"main_page_configs": { |
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'; | |
import 'dart:math'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
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'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
import 'package:equatable/equatable.dart'; | |
void main() { | |
runApp( | |
BlocProvider( | |
// Глобальний Cubit на весь застосунок | |
create: (_) => MyCubit(), | |
child: const MyApp(), |
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:math'; | |
void main() { | |
const pow2_32 = 1 << 32; // 4294967296 | |
try { | |
final number = Random().nextInt(pow2_32); | |
print('Generated number: $number'); | |
} catch (e) { | |
print('Error: $e'); |
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:math'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const FaceWithSmileApp()); | |
} | |
class FaceWithSmileApp extends StatelessWidget { | |
const FaceWithSmileApp({super.key}); |
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 numbers = []; | |
final temp = []; | |
for (var digit in numbers) { | |
if(digit%2 == 0) { | |
temp.add(digit); | |
} | |
} | |
} |
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 person = Person.create('Oleh', 29); | |
person.sayHello(); | |
} | |
class Person { | |
Person(String name, int age): this.name = name, this.age = age; |
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 person = Person.named('Oleh', 29); | |
person.sayHello(); | |
} | |
class Person { | |
// Іменований конструктор | |
// Можно також записати ось так | |
// Person.named(this.name, this.age) |
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 person = Person('Oleh', 29); | |
person.sayHello(); | |
} | |
class Person { | |
// Звичайний коструктор | |
Person(String name, int age) : this.name = name, this.age = age { |
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
// Повна версія | |
class HeroFull { | |
HeroFull({ | |
required String name, | |
required String gender, | |
required String skinColor, | |
required double height, | |
required String weapon, | |
}) : name = name, | |
gender = gender, |
NewerOlder