Skip to content

Commit

Permalink
chore: version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
techno-disaster committed Oct 21, 2021
1 parent d8e78eb commit b9548f0
Show file tree
Hide file tree
Showing 18 changed files with 127 additions and 86 deletions.
2 changes: 2 additions & 0 deletions lib/command/bloc/command_bloc.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import 'dart:async';

import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';
import 'package:hive/hive.dart';

import 'package:tldr/command/models/command.dart';
import 'package:tldr/utils/constants.dart';

Expand Down
1 change: 1 addition & 0 deletions lib/command/models/command.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:equatable/equatable.dart';
import 'package:hive/hive.dart';

part 'command.g.dart';

@HiveType(typeId: 0)
Expand Down
5 changes: 3 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:hive/hive.dart';
import 'package:path_provider/path_provider.dart';

import 'package:tldr/command/models/command.dart';
import 'package:tldr/screens/home.dart';
import 'package:tldr/utils/constants.dart';
import 'package:tldr/utils/router.dart';
import 'package:path_provider/path_provider.dart';

import 'command/bloc/command_bloc.dart';

void main() async {
Expand Down
1 change: 1 addition & 0 deletions lib/remote/requests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'dart:typed_data';
import 'package:archive/archive.dart';
import 'package:http/http.dart' as http;
import 'package:path_provider/path_provider.dart';

import 'package:tldr/command/models/command.dart';

class TldrBackend {
Expand Down
13 changes: 7 additions & 6 deletions lib/screens/about_app.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

import 'package:google_fonts/google_fonts.dart';
import 'package:markdown_widget/markdown_widget.dart';
import 'package:tldr/utils/constants.dart';
import 'package:url_launcher/url_launcher.dart';

import 'package:tldr/utils/constants.dart';

class AboutApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -71,11 +73,10 @@ class AboutApp extends StatelessWidget {
borderRadius: BorderRadius.circular(10.0),
),
color: Color(0xff2e2f37),
onPressed: () =>
_launchUrl(appURL),
onPressed: () => _launchUrl(appURL),
child: Row(
children: [
Container(
Container(
height: 20,
width: 20,
child: Image.asset(
Expand All @@ -87,8 +88,8 @@ class AboutApp extends StatelessWidget {
),
Text(
"View this app on Github",
style:
TextStyle(color: Theme.of(context).colorScheme.secondary),
style: TextStyle(
color: Theme.of(context).colorScheme.secondary),
),
],
),
Expand Down
4 changes: 3 additions & 1 deletion lib/screens/all_commands_screen.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import 'package:flutter/material.dart';

import 'package:bubble_tab_indicator/bubble_tab_indicator.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

import 'package:tldr/command/bloc/command_bloc.dart';
import 'package:tldr/command/models/command.dart';
import 'package:tldr/utils/commands_tile.dart';
import 'package:tldr/utils/constants.dart';
import 'package:bubble_tab_indicator/bubble_tab_indicator.dart';

class AllCommandsScreen extends StatefulWidget {
final List<Command> commands;
Expand Down
6 changes: 4 additions & 2 deletions lib/screens/command_details.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import 'package:flutter/material.dart';

import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:markdown_widget/markdown_widget.dart';
import 'package:url_launcher/url_launcher.dart';

import 'package:tldr/command/bloc/command_bloc.dart';
import 'package:tldr/command/models/command.dart';
import 'package:tldr/remote/requests.dart';
import 'package:tldr/utils/constants.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:google_fonts/google_fonts.dart';

class CommandDetails extends StatefulWidget {
final Command command;
Expand Down
2 changes: 2 additions & 0 deletions lib/screens/favorites_screen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';

import 'package:flutter_bloc/flutter_bloc.dart';

import 'package:tldr/command/bloc/command_bloc.dart';
import 'package:tldr/utils/favorites_tile.dart';

Expand Down
9 changes: 6 additions & 3 deletions lib/screens/home.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import 'dart:collection';

import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

import 'package:flare_flutter/flare_actor.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:intl/intl.dart';
import 'package:url_launcher/url_launcher.dart';

import 'package:tldr/command/bloc/command_bloc.dart';
import 'package:tldr/command/models/command.dart';
import 'package:tldr/remote/requests.dart';
import 'package:flare_flutter/flare_actor.dart';
import 'package:tldr/utils/constants.dart';
import 'package:tldr/utils/favorites_tile.dart';
import 'package:tldr/utils/recents_tile.dart';
import 'package:tldr/utils/router.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:intl/intl.dart';

class TLDR extends StatefulWidget {
@override
Expand Down
2 changes: 2 additions & 0 deletions lib/screens/recents_screen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';

import 'package:flutter_bloc/flutter_bloc.dart';

import 'package:tldr/command/bloc/command_bloc.dart';
import 'package:tldr/utils/recents_tile.dart';

Expand Down
2 changes: 2 additions & 0 deletions lib/screens/search_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import 'dart:async';
import 'dart:collection';

import 'package:flutter/material.dart';

import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_typeahead/flutter_typeahead.dart';

import 'package:tldr/command/bloc/command_bloc.dart';
import 'package:tldr/command/models/command.dart';
import 'package:tldr/screens/command_details.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/utils/commands_tile.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';

import 'package:flutter_bloc/flutter_bloc.dart';

import 'package:tldr/command/bloc/command_bloc.dart';
import 'package:tldr/command/models/command.dart';
import 'package:tldr/utils/constants.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/utils/constants.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:flutter/material.dart';

import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:hive/hive.dart';

import 'package:tldr/command/bloc/command_bloc.dart';
import 'package:tldr/command/models/command.dart';
import 'package:tldr/screens/about_app.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/utils/favorites_tile.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';

import 'package:flutter_bloc/flutter_bloc.dart';

import 'package:tldr/command/bloc/command_bloc.dart';
import 'package:tldr/command/models/command.dart';
import 'package:tldr/utils/constants.dart';
Expand Down
67 changes: 34 additions & 33 deletions lib/utils/recents_tile.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';

import 'package:flutter_bloc/flutter_bloc.dart';

import 'package:tldr/command/bloc/command_bloc.dart';
import 'package:tldr/command/models/command.dart';
import 'package:tldr/utils/constants.dart';
Expand All @@ -14,41 +16,40 @@ class RecentsTile extends StatelessWidget {
builder: (context, state) {
state.recentCommands.sort((a, b) => a.dateTime!.compareTo(b.dateTime!));
List<Command> recentCommands = state.recentCommands.reversed.toList();
return ListTile(
onTap: () {
Navigator.push(
context,
createCommandDetailsRoute(
recentCommands[index],
),
);
Command c = Command(
name: recentCommands[index].name,
platform: recentCommands[index].platform,
dateTime: DateTime.now());
BlocProvider.of<CommandBloc>(context).add(
AddToHistory(c),
);
BlocProvider.of<CommandBloc>(context).add(
GetFromHistory(),
);
},
leading: Icon(
Icons.history,
color: Colors.blueAccent,
),
title: Text(recentCommands[index].name),
subtitle: Text(recentCommands[index].platform),
trailing: Text(
formatDuration(
DateTime.now().difference(
recentCommands[index].dateTime!,
),
return ListTile(
onTap: () {
Navigator.push(
context,
createCommandDetailsRoute(
recentCommands[index],
),
);
Command c = Command(
name: recentCommands[index].name,
platform: recentCommands[index].platform,
dateTime: DateTime.now());
BlocProvider.of<CommandBloc>(context).add(
AddToHistory(c),
);
BlocProvider.of<CommandBloc>(context).add(
GetFromHistory(),
);
},
leading: Icon(
Icons.history,
color: Colors.blueAccent,
),
title: Text(recentCommands[index].name),
subtitle: Text(recentCommands[index].platform),
trailing: Text(
formatDuration(
DateTime.now().difference(
recentCommands[index].dateTime!,
),
style: TextStyle(color: Colors.grey),
),
);

style: TextStyle(color: Colors.grey),
),
);
},
);
}
Expand Down
1 change: 1 addition & 0 deletions lib/utils/router.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';

import 'package:tldr/command/models/command.dart';
import 'package:tldr/screens/about_app.dart';
import 'package:tldr/screens/all_commands_screen.dart';
Expand Down
24 changes: 19 additions & 5 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.1"
version: "2.8.2"
bloc:
dependency: transitive
description:
Expand Down Expand Up @@ -119,7 +119,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
Expand Down Expand Up @@ -415,6 +415,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.8"
import_sorter:
dependency: "direct dev"
description:
name: import_sorter
url: "https://pub.dartlang.org"
source: hosted
version: "4.6.0"
intl:
dependency: "direct main"
description:
Expand Down Expand Up @@ -472,7 +479,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -694,14 +701,21 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2"
version: "0.4.3"
timing:
dependency: transitive
description:
name: timing
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
tint:
dependency: transitive
description:
name: tint
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -764,7 +778,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
video_player:
dependency: transitive
description:
Expand Down
Loading

0 comments on commit b9548f0

Please sign in to comment.