Skip to content

Commit

Permalink
fix: make mobile app running
Browse files Browse the repository at this point in the history
  • Loading branch information
1grzyb1 committed Mar 14, 2024
1 parent 9131e44 commit 6e977f0
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 84 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
18 changes: 10 additions & 8 deletions lib/presentation/info_screen/info_detail_screen.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_html_table/flutter_html_table.dart';
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
import 'package:odyssey_mobile/domain/entities/info.dart';
import 'package:odyssey_mobile/presentation/helpers/snackbar_helper.dart';
import 'package:url_launcher/url_launcher.dart';
Expand All @@ -24,24 +23,27 @@ class _InfoDetailScreenState extends State<InfoDetailScreen> {
centerTitle: true,
),
body: SingleChildScrollView(
child: Html(
data: widget.info.infoText,
customRenders: {tableMatcher(): tableRender()},
onLinkTap: (url, _, __, ___) => _launchURL(url, context),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: HtmlWidget(
widget.info.infoText,
onTapUrl: (url) => _launchURL(url, context),
),
),
));
}

// // TODO move to a better place, refactor, etc
void _launchURL(String? url, BuildContext context) async {
Future<bool> _launchURL(String? url, BuildContext context) async {
if (url == null) {
return;
return true;
}
try {
final uri = Uri.parse(url);
await launchUrl(uri, mode: LaunchMode.externalApplication);
} catch (_) {
showSnackBar(context: context, text: 'Nie udało się otworzyć strony :(');
}
return true;
}
}
2 changes: 1 addition & 1 deletion lib/presentation/main_view/main_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class _MainViewState extends State<MainView> {
enablePaddingAnimation: false,
currentIndex: tabsRouter.activeIndex,
onTap: tabsRouter.setActiveIndex,
items: const [
items: [
DotNavigationBarItem(icon: Icon(OotmIcons.home)),
DotNavigationBarItem(icon: Icon(OotmIcons.info)),
DotNavigationBarItem(icon: Icon(OotmIcons.schedule)),
Expand Down
136 changes: 68 additions & 68 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: async
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.10.0"
version: "2.11.0"
auto_route:
dependency: "direct main"
description:
Expand Down Expand Up @@ -165,10 +165,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.3.0"
checked_yaml:
dependency: transitive
description:
Expand Down Expand Up @@ -205,10 +205,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.0"
version: "1.18.0"
convert:
dependency: transitive
description:
Expand All @@ -229,10 +229,10 @@ packages:
dependency: transitive
description:
name: csslib
sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745
sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb"
url: "https://pub.dev"
source: hosted
version: "0.17.2"
version: "1.0.0"
cupertino_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -350,22 +350,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.3.0"
flutter_html:
dependency: "direct main"
description:
name: flutter_html
sha256: "342c7908f0a67bcec62b6e0f7cf23e23bafe7f64693665dd35be98d5e783bdfd"
url: "https://pub.dev"
source: hosted
version: "3.0.0-alpha.6"
flutter_html_table:
dependency: "direct main"
description:
name: flutter_html_table
sha256: b01c4867466740e8c177459f241e66ad67d4e7f6a081649ba1f035e925bbefa5
url: "https://pub.dev"
source: hosted
version: "3.0.0-alpha.4"
flutter_launcher_icons:
dependency: "direct dev"
description:
Expand All @@ -374,14 +358,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.12.0"
flutter_layout_grid:
dependency: transitive
description:
name: flutter_layout_grid
sha256: "86c1b21520612edfbb93f189b3ec05058470570f3a5c08ce10c92cc76a6e814e"
url: "https://pub.dev"
source: hosted
version: "1.0.6"
flutter_lints:
dependency: "direct dev"
description:
Expand All @@ -400,6 +376,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_widget_from_html_core:
dependency: "direct main"
description:
name: flutter_widget_from_html_core
sha256: "028f4989b9ff4907466af233d50146d807772600d98a3e895662fbdb09c39225"
url: "https://pub.dev"
source: hosted
version: "0.14.11"
frontend_server_client:
dependency: transitive
description:
Expand Down Expand Up @@ -460,10 +444,10 @@ packages:
dependency: transitive
description:
name: html
sha256: "79d498e6d6761925a34ee5ea8fa6dfef38607781d2fa91e37523474282af55cb"
sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a"
url: "https://pub.dev"
source: hosted
version: "0.15.2"
version: "0.15.4"
http:
dependency: transitive
description:
Expand Down Expand Up @@ -568,6 +552,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.6.1"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "2.0.1"
lints:
dependency: transitive
description:
Expand All @@ -588,26 +596,26 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev"
source: hosted
version: "0.12.13"
version: "0.12.16+1"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.8.0"
meta:
dependency: transitive
description:
name: meta
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.11.0"
mime:
dependency: transitive
description:
Expand All @@ -624,14 +632,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.0"
numerus:
dependency: transitive
description:
name: numerus
sha256: "436759d84f233b40107d0cc31cfa92d24e0960afeb2e506be70926d4cddffd9e"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
octo_image:
dependency: transitive
description:
Expand All @@ -652,10 +652,10 @@ packages:
dependency: transitive
description:
name: path
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev"
source: hosted
version: "1.8.2"
version: "1.9.0"
path_provider:
dependency: transitive
description:
Expand Down Expand Up @@ -792,14 +792,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.2"
quiver:
dependency: transitive
description:
name: quiver
sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47
url: "https://pub.dev"
source: hosted
version: "3.2.1"
recase:
dependency: transitive
description:
Expand Down Expand Up @@ -937,10 +929,10 @@ packages:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
sqflite:
dependency: transitive
description:
Expand All @@ -961,18 +953,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
stream_transform:
dependency: transitive
description:
Expand Down Expand Up @@ -1017,10 +1009,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.4.16"
version: "0.6.1"
time:
dependency: transitive
description:
Expand Down Expand Up @@ -1133,6 +1125,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "13.0.0"
watcher:
dependency: transitive
description:
Expand Down Expand Up @@ -1190,5 +1190,5 @@ packages:
source: hosted
version: "3.1.1"
sdks:
dart: ">=2.19.1 <3.0.0"
flutter: ">=3.3.0"
dart: ">=3.2.0-0 <4.0.0"
flutter: ">=3.7.0"
11 changes: 5 additions & 6 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ version: 1.1.2+15
environment:
sdk: ">=2.19.1 <3.0.0"

# Dependencies specify other packages that your package needs in order to work.
# Dependencies specify other packages that your package needs in order to work. vbv
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
Expand All @@ -44,7 +44,7 @@ dependencies:
dio: ^5.1.1
dot_navigation_bar: ^1.0.1+4
injectable: ^2.1.1
isar: ^3.0.5
isar: 3.0.5
isar_flutter_libs: ^3.0.5
get_it: ^7.2.0
json_annotation: ^4.8.0
Expand All @@ -58,9 +58,8 @@ dependencies:
# sliver_tools: ^0.2.5
hive_flutter: ^1.1.0
hive: ^2.2.3
flutter_html: ^3.0.0-alpha.6
flutter_html_table: ^3.0.0-alpha.4

flutter_widget_from_html_core: ^0.14.11


dev_dependencies:
auto_route_generator: ^6.1.0
Expand Down Expand Up @@ -208,4 +207,4 @@ flutter:
weight: 300
style: italic
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
# see https://flutter.dev/custom-fonts/#from-packages

0 comments on commit 6e977f0

Please sign in to comment.