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
| syntax="proto3"; | |
| message Student { | |
| int32 id = 1; | |
| string name = 2; | |
| } | |
| message Question { | |
| int32 id = 1; | |
| string text = 2; |
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 'package:flutter/material.dart'; | |
| import 'package:flutter/services.dart'; | |
| const appSupportedLocales = <Locale>[ | |
| Locale('ru'), | |
| Locale('en'), | |
| ]; |
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
| def get_str_of_intervals(arr: []) -> str: | |
| if not arr: | |
| return '' | |
| breaks = [] | |
| arr.sort() | |
| start = end = arr[0] | |
| for i in arr[1:]: | |
| diff = i - end | |
| if diff == 1: | |
| end = i |
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:firebase_storage/firebase_storage.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:meta/meta.dart'; | |
| enum ImageDownloadState { Idle, GettingURL, Downloading, Done, Error } | |
| class FirebaseStorageImage extends StatefulWidget { | |
| /// The reference of the image that has to be loaded. | |
| final StorageReference reference; | |
| /// The widget that will be displayed when loading if no [placeholderImage] is set. |
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'; | |
| abstract class ScreenSize { | |
| static Size size(BuildContext context) { | |
| return MediaQuery.of(context).size; | |
| } | |
| static double height(BuildContext context, | |
| {double dividedBy = 1, double reducedBy = 0.0}) { | |
| return (ScreenSize.size(context).height - reducedBy) / dividedBy; |
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
| loginLogoutTest() { | |
| group('app', () { | |
| FlutterDriver driver; | |
| setUpAll(() async { | |
| driver = await FlutterDriver.connect(); | |
| }); | |
| tearDownAll(() async { | |
| if (driver != null) { |
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:someapp/commons/screen_size_helpers.dart'; | |
| class HomeScreen extends StatefulWidget { | |
| @override | |
| _HomeScreenState createState() => _HomeScreenState(); | |
| } | |
| class _HomeScreenState extends State<HomeScreen> { | |
| PersistentBottomSheetController _controller; |
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:novoadvisor/commons/screen_size_helpers.dart'; | |
| class HomeScreen extends StatefulWidget { | |
| @override | |
| _HomeScreenState createState() => _HomeScreenState(); | |
| } | |
| class _HomeScreenState extends State<HomeScreen> { | |
| PersistentBottomSheetController _controller; |
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
| // To put bottom sheet into Stack (close on back press) | |
| WidgetsBinding.instance.addPostFrameCallback((_) { | |
| _scaffoldKey.currentState.showBottomSheet<void>(_bottomSheetBuilder); | |
| }); | |
| // screen sizes | |
| const i5s = Size(320.0, 568.0); | |
| const i8 = Size(375.0, 667.0) | |
| // rounded button |