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
// Author: Alex Li (https://github.com/AlexV525) | |
// Date: 2025/04/20 | |
// | |
// Complete by the Gemini 2.5 Flash within 5 talks. | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/widgets.dart'; | |
/// A sliver that clips its child using a rounded rectangle. |
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: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 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
// [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 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
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 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
Dart +22.7k/ -10.5k βββββββββββββββββββββ 81.0% | |
JSON +1.0k/ -48 βββββββββββββββββββββ 5.6% | |
SVG +178/ -216 βββββββββββββββββββββ 4.9% | |
XML +1.3k/ -214 βββββββββββββββββββββ 4.8% | |
Markdown +50/ -34 βββββββββββββββββββββ 1.0% | |
YAML +229/ -169 βββββββββββββββββββββ 0.9% | |
TypeScript +126/ -86 βββββββββββββββββββββ 0.7% | |
OpenStep β¦ +70/ -46 βββββββββββββββββββββ 0.4% | |
Text +516/ -6 βββββββββββββββββββββ 0.4% | |
Gradle +64/ -28 βββββββββββββββββββββ 0.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
// 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 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
/// [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 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
/** 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 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
// | |
// [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 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
// | |
// [Author] Alex (https://github.com/AlexV525) | |
// [Date] 2022/6/8 20:46 | |
// | |
import 'dart:convert'; | |
import 'dart:io'; | |
class CustomHttpOverrides extends HttpOverrides { | |
@override |
NewerOlder