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
| // Copyright 2015 The Chromium Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| import 'dart:async'; | |
| import 'dart:developer'; | |
| import 'dart:isolate'; | |
| import 'package:meta/meta.dart'; | |
| const bool kReleaseMode = |
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:io'; | |
| import 'dart:isolate'; | |
| import 'package:http/http.dart' as http; | |
| // ignore_for_file: unawaited_futures | |
| void main([List<String> args]) { | |
| // prefix0.main(["15900152"]); | |
| _buildServers(); |
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
| Stream<T> valueListenableToStreamAdapter<T>(ValueListenable<T> listenable) { | |
| StreamController<T> controller; | |
| void listener() { | |
| controller.add(listenable.value); | |
| } | |
| void start() { | |
| listenable.addListener(listener); | |
| } |
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(MyApp()); | |
| const kAmountOfSentences = 8; | |
| const kSentences = [ | |
| "Já defendeu o TCC?", | |
| "Quantos artigos esse ano?", | |
| "E as namoradinhas?", |
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:io'; | |
| import 'package:http/http.dart' as http; | |
| ///Returns the file as a stream of bytes | |
| Future<Stream<List<int>>> downloadAsStream(String url) async { | |
| var result = await Client().send( | |
| Request( | |
| "get", |
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
| #This Github Action builds the Dart 'bin' folder on every push commited to GitHub | |
| name: Build on push | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
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'; | |
| /*This must be added to your MaterialApp`s navigatorObservers, like: | |
| * navigatorObservers: [routeObserver] | |
| */ | |
| final routeObserver = RouteObserver<PageRoute>(); | |
| abstract class VisibilityAwareState<T extends StatefulWidget> | |
| extends State<T> with WidgetsBindingObserver, RouteAware { | |
| bool _isOnScreen = true; |
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'; | |
| extension LoadSplitterTransformerExtension<T> on Stream<T> { | |
| ///Splits the data events between all the listeners. | |
| ///The error events are still being emitted to all of them. | |
| /// | |
| /// ### Example | |
| /// | |
| /// var splitted = Stream.fromIterable([1, 2, 3]).splitLoad(); | |
| /// |
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:path/path.dart' as path; | |
| String getFlutterBinFolderPath() { | |
| final pathString = Platform.environment['PATH']; | |
| if (pathString == null) { | |
| throw 'Flutter bin folder not located on PATH'; | |
| } | |
| final flutterPath = pathString.split(';').firstWhere( |
OlderNewer