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
import 'dart:io'; | |
final separator = '-' * 80; | |
void main() { | |
final file = File('NOTICES').readAsStringSync(); | |
final sections = | |
file.split('\n$separator\n').map((e) => e.split('\n').first).toSet(); | |
print(sections.join('\n')); | |
} |
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
// [Author] Alex (https://github.com/AlexV525) | |
// [Date] 2024/03/15 10:57 | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
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
platform :ios, '12.0' | |
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. | |
ENV['COCOAPODS_DISABLE_STATS'] = 'true' | |
project 'Runner', { | |
'Debug' => :debug, | |
'Profile' => :release, | |
'Release' => :release, | |
} |
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
Dart +38.2k/ -36.7k βββββββββββββββββββββ 93.4% | |
SVG +78/ -216 βββββββββββββββββββββ 2.1% | |
XML +176/ -181 βββββββββββββββββββββ 1.3% | |
JSON +259/ -59 βββββββββββββββββββββ 1.0% | |
Java +160/ -137 βββββββββββββββββββββ 0.8% | |
YAML +272/ -90 βββββββββββββββββββββ 0.5% | |
Kotlin +83/ -71 βββββββββββββββββββββ 0.4% | |
OpenStep β¦ +70/ -30 βββββββββββββββββββββ 0.2% | |
Shell +35/ -8 βββββββββββββββββββββ 0.1% | |
Markdown +30/ -5 βββββββββββββββββββββ 0.1% |
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
// Thanks to: https://gist.github.com/bennyhuo/af7c43cc4831661193605e124f539942 | |
val urlMappings = mapOf( | |
"https://dl.google.com/dl/android/maven2" to "https://mirrors.tencent.com/nexus/repository/maven-public/", | |
"https://repo.maven.apache.org/maven2" to "https://mirrors.tencent.com/nexus/repository/maven-public/", | |
"https://plugins.gradle.org/m2" to "https://mirrors.tencent.com/nexus/repository/gradle-plugins/" | |
) | |
fun RepositoryHandler.mirroring() { | |
all { |
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
/// [Author] Alex (https://github.com/AlexV525) | |
/// [Date] 2022/03/14 11:59 | |
import 'packages:flutter/services.dart'; | |
/// A formatter that takes a [RegExp] to match the value. | |
/// | |
/// Currently the formatter only support match the first group. | |
class RegExpFormatter extends TextInputFormatter { | |
RegExpFormatter(this.regExp); |
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://github.com/dart-lang/pub-dev/issues/4416 **/ | |
body { | |
background-color: #10161e; | |
color: #dcdcdc; | |
font-size: 14px; | |
line-height: 1.6; | |
margin: 0; | |
padding: 0; | |
overflow-wrap: break-word; | |
} |
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
// | |
// [Author] Alex (https://github.com/AlexV525) | |
// [Date] 2022/08/17 13:45 | |
// | |
import 'package:flutter/material.dart'; | |
/// A tri-state indicates the loading process of specific data. | |
enum TriState { | |
/// The data is still loading, not available. |
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
// | |
// [Author] Alex (https://github.com/AlexV525) | |
// [Date] 2022/6/8 20:46 | |
// | |
import 'dart:convert'; | |
import 'dart:io'; | |
class CustomHttpOverrides extends HttpOverrides { | |
@override |
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
// | |
// [Author] Alex (https://github.com/AlexV525) | |
// [Date] 2020/9/15 14:06 | |
// | |
import 'dart:async'; | |
import 'package:flutter/widgets.dart'; | |
extension SafeSetStateExtension on State { |
NewerOlder