Skip to content

Commit

Permalink
add news page
Browse files Browse the repository at this point in the history
  • Loading branch information
smart7even committed Sep 3, 2024
1 parent a4f7636 commit b1cd0e5
Show file tree
Hide file tree
Showing 19 changed files with 901 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ app.*.map.json
/android/app/release

# Test coverage report
coverage
coverage

env.json
34 changes: 34 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "uneconly",
"request": "launch",
"type": "dart",
"args": [
"--dart-define-from-file=env.json"
]
},
{
"name": "uneconly (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile",
"args": [
"--dart-define-from-file=env.json"
]
},
{
"name": "uneconly (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release",
"args": [
"--dart-define-from-file=env.json"
]
}
]
}
51 changes: 51 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ PODS:
- AppMetricaCore (= 5.7.0)
- AppMetricaCoreUtils (= 5.7.0)
- AppMetricaLog (= 5.7.0)
- div_expressions_resolver (0.4.3):
- DivKit (< 31.0, >= 29.0)
- Flutter
- DivKit (30.15.0):
- DivKit_LayoutKit (= 30.15.0)
- DivKit_Serialization (= 30.15.0)
- VGSL (~> 6.0)
- DivKit_LayoutKit (30.15.0):
- DivKit_LayoutKitInterface (= 30.15.0)
- VGSL (~> 6.0)
- DivKit_LayoutKitInterface (30.15.0):
- VGSL (~> 6.0)
- DivKit_Serialization (30.15.0):
- VGSL (~> 6.0)
- Flutter (1.0.0)
- home_widget (0.0.1):
- Flutter
Expand All @@ -78,6 +92,9 @@ PODS:
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqflite (0.0.3):
- Flutter
- FlutterMacOS
- sqlite3 (3.46.1):
- sqlite3/common (= 3.46.1)
- sqlite3/common (3.46.1)
Expand All @@ -98,14 +115,26 @@ PODS:
- sqlite3/rtree
- url_launcher_ios (0.0.1):
- Flutter
- VGSL (6.4.1):
- VGSLFundamentals (= 6.4.1)
- VGSLNetworking (= 6.4.1)
- VGSLUI (= 6.4.1)
- VGSLFundamentals (6.4.1)
- VGSLNetworking (6.4.1):
- VGSLFundamentals (= 6.4.1)
- VGSLUI (= 6.4.1)
- VGSLUI (6.4.1):
- VGSLFundamentals (= 6.4.1)

DEPENDENCIES:
- appmetrica_plugin (from `.symlinks/plugins/appmetrica_plugin/ios`)
- div_expressions_resolver (from `.symlinks/plugins/div_expressions_resolver/ios`)
- Flutter (from `Flutter`)
- home_widget (from `.symlinks/plugins/home_widget/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
- sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)

Expand All @@ -127,12 +156,22 @@ SPEC REPOS:
- AppMetricaProtobufUtils
- AppMetricaStorageUtils
- AppMetricaWebKit
- DivKit
- DivKit_LayoutKit
- DivKit_LayoutKitInterface
- DivKit_Serialization
- KSCrash
- sqlite3
- VGSL
- VGSLFundamentals
- VGSLNetworking
- VGSLUI

EXTERNAL SOURCES:
appmetrica_plugin:
:path: ".symlinks/plugins/appmetrica_plugin/ios"
div_expressions_resolver:
:path: ".symlinks/plugins/div_expressions_resolver/ios"
Flutter:
:path: Flutter
home_widget:
Expand All @@ -143,6 +182,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite:
:path: ".symlinks/plugins/sqflite/darwin"
sqlite3_flutter_libs:
:path: ".symlinks/plugins/sqlite3_flutter_libs/ios"
url_launcher_ios:
Expand All @@ -166,15 +207,25 @@ SPEC CHECKSUMS:
AppMetricaProtobufUtils: 69272f30e19e30d814b7f05cbd1130e888764c8d
AppMetricaStorageUtils: d72c866868dce22626441349bcd45eeec43b9e86
AppMetricaWebKit: bf5a05e7ed13857807522639c8984a1c192e88ef
div_expressions_resolver: 4de71072592939bc93c771766e252a21ee07cfd2
DivKit: b410363a61bfbd42dd75765f78ec868eedc3007a
DivKit_LayoutKit: a7e0441fbfa9ef9aa406b9a492b2b086fc57e5ba
DivKit_LayoutKitInterface: 86f4d1823b42dfeabbd10f1d8cc4be92cee0f8ed
DivKit_Serialization: 8f5d3b3b05f03cb5c3e7f68eb0eb683891089a0f
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
home_widget: 0434835a4c9a75704264feff6be17ea40e0f0d57
KSCrash: 158a0998f08ae7d4e54ef8a2da62d6e08b46d03a
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
sqlite3: 19d8c26842078b45fa2deed63c4bbbe0c0e786ce
sqlite3_flutter_libs: c00457ebd31e59fa6bb830380ddba24d44fbcd3b
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
VGSL: f933d558164acfa8df87e1365fa47b069871761c
VGSLFundamentals: a957918fb54f377e1f75b4e46923a8f4b8db9b3b
VGSLNetworking: 79a991a7695839a2c80715c7bc5a06327a1a0259
VGSLUI: 71495727b634be4042a805eb52ce2e0297d02812

PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011

Expand Down
6 changes: 3 additions & 3 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -670,7 +670,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -719,7 +719,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
2 changes: 2 additions & 0 deletions lib/common/model/dependencies.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:uneconly/common/database/database.dart';
import 'package:uneconly/common/logging/logging_repository.dart';
import 'package:uneconly/feature/initialization/widget/inherited_dependencies.dart';
import 'package:uneconly/feature/settings/data/settings_repository.dart';
import 'package:uneconly/feature/tutorials/data/tutorial_repository.dart';

class Dependencies {
Dependencies();
Expand All @@ -14,6 +15,7 @@ class Dependencies {
late final ISettingsRepository settingsRepository;
late final MyDatabase database;
late final Dio dio;
late final ITutorialRepository tutorialRepository;

factory Dependencies.of(BuildContext context) =>
InheritedDependencies.of(context);
Expand Down
10 changes: 9 additions & 1 deletion lib/common/routing/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ import 'package:uneconly/feature/schedule/widget/home_page.dart';
import 'package:uneconly/feature/schedule/widget/schedule_page.dart';
import 'package:uneconly/feature/select/widget/select_page.dart';
import 'package:uneconly/feature/settings/widget/settings_page.dart';
import 'package:uneconly/feature/tutorials/widget/home_widget_tutorial.dart';
import 'package:uneconly/feature/tutorials/widget/tutorials_page.dart';

enum Routes with OctopusRoute {
loading('loading', title: 'Loading'),
schedule('schedule', title: 'Schedule'),
select('select', title: 'Select'),
settings('settings', title: 'Settings'),
home('home', title: 'Home');
home('home', title: 'Home'),
tutorials('tutorials', title: 'Tutorials'),
homeWidgetTutorial('homeWidgetTutorial', title: 'Home Widget Tutorial');

const Routes(this.name, {this.title});

Expand Down Expand Up @@ -49,6 +53,10 @@ enum Routes with OctopusRoute {
return const SettingsPage();
case Routes.home:
return const HomePage();
case Routes.tutorials:
return const TutorialsPage();
case Routes.homeWidgetTutorial:
return const HomeWidgetTutorial();
}
}
}
8 changes: 8 additions & 0 deletions lib/feature/initialization/data/initialize_dependencies.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import 'package:uneconly/constants.dart';
import 'package:uneconly/feature/initialization/data/platform/platform_initialization.dart';
import 'package:uneconly/feature/settings/data/settings_local_data_provider.dart';
import 'package:uneconly/feature/settings/data/settings_repository.dart';
import 'package:uneconly/feature/tutorials/data/tutorial_network_data_provider.dart';
import 'package:uneconly/feature/tutorials/data/tutorial_repository.dart';

/// Initializes the app and returns a [Dependencies] object
Future<Dependencies> $initializeDependencies({
Expand Down Expand Up @@ -74,6 +76,12 @@ Map<String, _InitializationStep> _getInitializationSteps({
baseUrl: serverAddress,
),
),
'Initialize tutorial repository': (dependencies) async =>
dependencies.tutorialRepository = TutorialRepository(
networkDataProvider: TutorialNetworkDataProvider(
dio: dependencies.dio,
),
),
'Log app initialized': (_) {},
};

Expand Down
13 changes: 13 additions & 0 deletions lib/feature/schedule/widget/schedule_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,19 @@ class ScheduleDrawer extends StatelessWidget {
);
},
),
// ListTile for news
ListTile(
title: Text(
AppLocalizations.of(context)!.news,
),
onTap: () {
Octopus.of(
context,
).push(
Routes.tutorials,
);
},
),
// ListTile to view schedule of another group
ListTile(
title: Text(
Expand Down
Loading

0 comments on commit b1cd0e5

Please sign in to comment.