Skip to content

Commit bf93833

Browse files
committedAug 23, 2023
chore: dep updates
1 parent f37ef9e commit bf93833

19 files changed

+472
-320
lines changed
 

‎.github/FUNDING.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# These are supported funding model platforms
22

3-
github: [Techno-Disaster]
3+
github: [techno-disaster]
44
patreon: technodisaster
55
ko_fi: technodisaster

‎README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
</a>
55

66
<p align="center">
7-
<a href="https://github.com/Techno-Disaster/tldr-flutter/issues/new?template=bug_report.md">Report bug</a>
7+
<a href="https://github.com/techno-disaster/tldr-flutter/issues/new?template=bug_report.md">Report bug</a>
88
·
9-
<a href="https://github.com/Techno-Disaster/tldr-flutter/issues/new?template=feature_request.md">Request feature</a>
9+
<a href="https://github.com/techno-disaster/tldr-flutter/issues/new?template=feature_request.md">Request feature</a>
1010
</p>
1111
</p>
1212

13-
[![GitHub All Releases](https://img.shields.io/github/downloads/Techno-Disaster/tldr-flutter/total.svg)](https://github.com/Techno-Disaster/tldr-flutter/releases/latest)
13+
[![GitHub All Releases](https://img.shields.io/github/downloads/techno-disaster/tldr-flutter/total.svg)](https://github.com/techno-disaster/tldr-flutter/releases/latest)
1414
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
1515
[![bloc](https://img.shields.io/badge/flutter-bloc-blue)](https://github.com/felangel/bloc)
1616

@@ -54,7 +54,7 @@ This app is just that: an ever-growing collection of examples for the most commo
5454

5555
## Bugs and feature requests
5656

57-
[Please open a new issue](https://github.com/Techno-Disaster/tldr-flutter/issues/new?template=bug_report.md).
57+
[Please open a new issue](https://github.com/techno-disaster/tldr-flutter/issues/new?template=bug_report.md).
5858

5959
## Contributing
6060

@@ -68,4 +68,4 @@ Currently open to all contributions. Hit those issue and PR buttons.
6868

6969
## Copyright and license
7070

71-
Code released under the [MIT License](https://github.com/Techno-Disaster/tldr-flutter/blob/master/LICENSE).
71+
Code released under the [MIT License](https://github.com/techno-disaster/tldr-flutter/blob/master/LICENSE).

‎android/app/build.gradle

+3-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if (keystorePropertiesFile.exists()) {
3131
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
3232
}
3333
android {
34-
compileSdkVersion 31
34+
compileSdkVersion 33
3535

3636
sourceSets {
3737
main.java.srcDirs += 'src/main/kotlin'
@@ -45,13 +45,12 @@ android {
4545
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
4646
applicationId "wtf.technodisaster.tldr"
4747
minSdkVersion 16
48-
targetSdkVersion 31
48+
targetSdkVersion 33
4949
versionCode flutterVersionCode.toInteger()
5050
versionName flutterVersionName
5151
}
52-
signingConfigs {
52+
signingConfigs {
5353
release {
54-
storeFile file('/home/techno_disaster/td.keystore')
5554
keyAlias keystoreProperties['keyAlias']
5655
keyPassword keystoreProperties['keyPassword']
5756
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null

‎android/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.0.3'
9+
classpath 'com.android.tools.build:gradle:7.3.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
@@ -26,6 +26,6 @@ subprojects {
2626
project.evaluationDependsOn(':app')
2727
}
2828

29-
task clean(type: Delete) {
29+
tasks.register("clean", Delete) {
3030
delete rootProject.buildDir
3131
}

‎android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

‎ios/Flutter/Debug.xcconfig

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "Generated.xcconfig"

‎ios/Flutter/Release.xcconfig

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "Generated.xcconfig"

‎ios/Podfile

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Uncomment this line to define a global platform for your project
2+
# platform :ios, '11.0'
3+
4+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6+
7+
project 'Runner', {
8+
'Debug' => :debug,
9+
'Profile' => :release,
10+
'Release' => :release,
11+
}
12+
13+
def flutter_root
14+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15+
unless File.exist?(generated_xcode_build_settings_path)
16+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17+
end
18+
19+
File.foreach(generated_xcode_build_settings_path) do |line|
20+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
21+
return matches[1].strip if matches
22+
end
23+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24+
end
25+
26+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27+
28+
flutter_ios_podfile_setup
29+
30+
target 'Runner' do
31+
use_frameworks!
32+
use_modular_headers!
33+
34+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35+
target 'RunnerTests' do
36+
inherit! :search_paths
37+
end
38+
end
39+
40+
post_install do |installer|
41+
installer.pods_project.targets.each do |target|
42+
flutter_additional_ios_build_settings(target)
43+
end
44+
end

‎lib/main.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import 'blocs/command_bloc/command_bloc.dart';
1313

1414
void main() async {
1515
WidgetsFlutterBinding.ensureInitialized();
16-
BlocOverrides.runZoned(() {}, blocObserver: SimpleBlocObserver());
16+
Bloc.observer = SimpleBlocObserver();
1717
final appDocumentDir = await getApplicationDocumentsDirectory();
1818
Hive.init(appDocumentDir.path);
1919
Hive.registerAdapter(CommandAdapter());
@@ -34,12 +34,12 @@ class MyApp extends StatelessWidget {
3434
debugShowCheckedModeBanner: false,
3535
title: 'tldr man-pages',
3636
theme: ThemeData(
37-
backgroundColor: Color(0xff17181c),
3837
canvasColor: Color(0xff17181c),
3938
visualDensity: VisualDensity.adaptivePlatformDensity,
4039
colorScheme: ColorScheme.fromSwatch().copyWith(
4140
secondary: Color(0xff2e8fff),
4241
brightness: Brightness.dark,
42+
background: Color(0xff17181c),
4343
),
4444
appBarTheme: AppBarTheme(
4545
systemOverlayStyle: SystemUiOverlayStyle.light,

‎lib/remote/requests.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TldrBackend {
1616
File file = File("$dir/commands.json");
1717
final Uri commandsUrl = Uri.https(
1818
'raw.githubusercontent.com',
19-
'/Techno-Disaster/tldr-flutter/master/tldrdict/static/commands2.json',
19+
'/techno-disaster/tldr-flutter/master/tldrdict/static/commands2.json',
2020
);
2121
var data = [];
2222
try {
@@ -32,7 +32,7 @@ class TldrBackend {
3232
Future<void> getVersionAndLastUpdateDateTime() async {
3333
final Uri getVersionURI = Uri.https(
3434
'raw.githubusercontent.com',
35-
'/Techno-Disaster/tldr-flutter/master/tldrdict/static/version.json',
35+
'/techno-disaster/tldr-flutter/master/tldrdict/static/version.json',
3636
);
3737
Map<String, dynamic> data;
3838
try {
@@ -93,7 +93,7 @@ class TldrBackend {
9393
'GET',
9494
Uri.https(
9595
'raw.githubusercontent.com',
96-
'/Techno-Disaster/tldr-flutter/master/tldrdict/static/allpages.zip',
96+
'/techno-disaster/tldr-flutter/master/tldrdict/static/allpages.zip',
9797
));
9898
zipDownloaderAndExtractor(
9999
httpClient.send(allPagesRequest),

‎lib/screens/about_app.dart

+9-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'package:flutter/gestures.dart';
22
import 'package:flutter/material.dart';
33

4-
import 'package:google_fonts/google_fonts.dart';
54
import 'package:markdown_widget/markdown_widget.dart';
65
import 'package:url_launcher/url_launcher.dart';
76

@@ -51,16 +50,7 @@ class AboutApp extends StatelessWidget {
5150
physics: NeverScrollableScrollPhysics(),
5251
shrinkWrap: true,
5352
data: aboutApp,
54-
styleConfig: StyleConfig(
55-
codeConfig: CodeConfig(
56-
codeStyle: GoogleFonts.robotoMono(fontSize: 12),
57-
),
58-
pConfig: PConfig(
59-
selectable: false,
60-
onLinkTap: (url) => _launchUrl(url),
61-
),
62-
markdownTheme: MarkdownTheme.darkTheme,
63-
),
53+
config: MarkdownConfig.darkConfig,
6454
),
6555
SizedBox(
6656
height: 10,
@@ -73,7 +63,7 @@ class AboutApp extends StatelessWidget {
7363
borderRadius: BorderRadius.circular(10.0),
7464
),
7565
color: Color(0xff2e2f37),
76-
onPressed: () => _launchUrl(appURL),
66+
onPressed: () => _launchUrl(Uri.parse(appURL)),
7767
child: Row(
7868
children: [
7969
Container(
@@ -127,7 +117,8 @@ class AboutApp extends StatelessWidget {
127117
text: "here",
128118
recognizer: TapGestureRecognizer()
129119
..onTap = () {
130-
launch(flareURL);
120+
launchUrl(Uri.parse(flareURL),
121+
mode: LaunchMode.externalApplication);
131122
},
132123
style: TextStyle(
133124
color: Theme.of(context).colorScheme.secondary,
@@ -150,7 +141,8 @@ class AboutApp extends StatelessWidget {
150141
text: "here",
151142
recognizer: TapGestureRecognizer()
152143
..onTap = () {
153-
launch(iconURL);
144+
launchUrl(Uri.parse(iconURL),
145+
mode: LaunchMode.externalApplication);
154146
},
155147
style: TextStyle(
156148
color: Theme.of(context).colorScheme.secondary,
@@ -171,5 +163,6 @@ class AboutApp extends StatelessWidget {
171163
}
172164
}
173165

174-
void _launchUrl(_url) async =>
175-
await canLaunch(_url) ? await launch(_url) : throw 'Could not launch $_url';
166+
void _launchUrl(Uri _url) async => await canLaunchUrl(_url)
167+
? await launchUrl(_url, mode: LaunchMode.externalApplication)
168+
: throw 'Could not launch ${_url.toString()}';

‎lib/screens/command_details.dart

+6-19
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'package:flutter/material.dart';
22

33
import 'package:flutter_bloc/flutter_bloc.dart';
4-
import 'package:google_fonts/google_fonts.dart';
54
import 'package:markdown_widget/markdown_widget.dart';
65
import 'package:url_launcher/url_launcher.dart';
76

@@ -68,21 +67,8 @@ class _CommandDetailsState extends State<CommandDetails> {
6867
shrinkWrap: true,
6968
physics: NeverScrollableScrollPhysics(),
7069
data: details ??
71-
'No details found, this should never happen please file a bug report [here](https://github.com/Techno-Disaster/tldr-flutter/issues)',
72-
childMargin: EdgeInsets.all(10),
73-
loadingWidget: Center(
74-
child: CircularProgressIndicator(),
75-
),
76-
styleConfig: StyleConfig(
77-
codeConfig: CodeConfig(
78-
codeStyle: GoogleFonts.robotoMono(fontSize: 12),
79-
),
80-
pConfig: PConfig(
81-
selectable: false,
82-
onLinkTap: (url) => _launchUrl(url),
83-
),
84-
markdownTheme: MarkdownTheme.darkTheme,
85-
),
70+
'No details found, this should never happen please file a bug report [here](https://github.com/techno-disaster/tldr-flutter/issues)',
71+
config: MarkdownConfig.darkConfig,
8672
),
8773
SizedBox(
8874
height: 30,
@@ -95,7 +81,7 @@ class _CommandDetailsState extends State<CommandDetails> {
9581
borderRadius: BorderRadius.circular(10.0),
9682
),
9783
color: Color(0xff2e2f37),
98-
onPressed: () => _launchUrl(commandUrl),
84+
onPressed: () => _launchUrl(Uri.parse(commandUrl)),
9985
child: Row(
10086
children: [
10187
Container(
@@ -134,5 +120,6 @@ class _CommandDetailsState extends State<CommandDetails> {
134120
}
135121
}
136122

137-
void _launchUrl(_url) async =>
138-
await canLaunch(_url) ? await launch(_url) : throw 'Could not launch $_url';
123+
void _launchUrl(Uri _url) async => await canLaunchUrl(_url)
124+
? await launchUrl(_url, mode: LaunchMode.externalApplication)
125+
: throw 'Could not launch ${_url.toString()}';

‎lib/screens/home.dart

+7-6
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,11 @@ class _TLDRState extends State<TLDR> {
177177
text: 'here',
178178
recognizer: TapGestureRecognizer()
179179
..onTap = () {
180-
launch(
181-
'https://github.com/Techno-Disaster/tldr-flutter/blob/master/tldrdict/static/version.txt',
182-
);
180+
launchUrl(
181+
Uri.parse(
182+
'https://raw.githubusercontent.com/techno-disaster/tldr-flutter/master/tldrdict/static/version.json',
183+
),
184+
mode: LaunchMode.externalApplication);
183185
},
184186
style: TextStyle(
185187
color: Theme.of(context).colorScheme.secondary,
@@ -393,9 +395,8 @@ class AboutTldrText extends StatelessWidget {
393395
text: "man pages ",
394396
recognizer: TapGestureRecognizer()
395397
..onTap = () {
396-
launch(
397-
'https://en.wikipedia.org/wiki/Man_page',
398-
);
398+
launchUrl(Uri.parse('https://en.wikipedia.org/wiki/Man_page'),
399+
mode: LaunchMode.externalApplication);
399400
},
400401
style: TextStyle(
401402
color: Theme.of(context).colorScheme.secondary,

‎lib/screens/search_screen.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class _SearchScreenState extends State<SearchScreen> {
6363
appBar: AppBar(
6464
titleSpacing: 0,
6565
elevation: 0,
66-
backgroundColor: Theme.of(context).backgroundColor,
66+
backgroundColor: Theme.of(context).colorScheme.background,
6767
title: Hero(
6868
tag: "search-bar",
6969
child: TypeAheadField(

‎lib/screens/settings_screen.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
5858
children: [
5959
ListTile(
6060
title: Text('Language'),
61-
subtitle:
62-
Text('Change language for commands tldr'),
61+
subtitle: Text('Change language for commands tldr'),
6362
trailing: Column(
6463
children: [
6564
Text(flag(currentLocale ?? 'en')),

‎lib/utils/constants.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final String flareURL =
2121
"https://flare.rive.app/a/cvl/files/flare/site-animaton/embed";
2222

2323
final String iconURL = "https://github.com/tldr-pages";
24-
final String appURL = "https://github.com/Techno-Disaster/tldr-flutter";
24+
final String appURL = "https://github.com/techno-disaster/tldr-flutter";
2525

2626
final String baseURL = "https://github.com/tldr-pages/tldr/blob/main/pages/";
2727
String formatDuration(Duration d) {
@@ -86,7 +86,7 @@ Route createAboutPageRoute() {
8686
showAlertDialog(BuildContext context, Command command) {
8787
final favCountriesBox = Hive.box(FAVORITE_COMMANDS);
8888
AlertDialog alert = AlertDialog(
89-
backgroundColor: Theme.of(context).backgroundColor,
89+
backgroundColor: Theme.of(context).colorScheme.background,
9090
title: Text("Delete ${command.name} from your favorites?"),
9191
actions: [
9292
MaterialButton(

0 commit comments

Comments
 (0)