From 2cbb8fb7014f6bee9adc1182a7ab96ce79417b09 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Fri, 17 Mar 2023 09:41:08 +0100 Subject: [PATCH] Initial commit --- .gitignore | 47 ++++ README.md | 3 + assets/undraw/REF | 1 + assets/undraw/undraw_couple.svg | 1 + assets/undraw/undraw_dog.svg | 1 + assets/undraw/undraw_family.svg | 1 + assets/undraw/undraw_file_manager.svg | 1 + assets/undraw/undraw_gifts.svg | 1 + assets/undraw/undraw_gone_shopping.svg | 1 + assets/undraw/undraw_greek_freak.svg | 1 + assets/undraw/undraw_jewelry.svg | 1 + assets/undraw/undraw_mobile_login.svg | 1 + assets/undraw/undraw_online_connection.svg | 1 + assets/undraw/undraw_online_groceries.svg | 1 + assets/undraw/undraw_pizza_sharing.svg | 1 + assets/undraw/undraw_progressive_app.svg | 1 + assets/undraw/undraw_sculpting.svg | 1 + assets/undraw/undraw_shopping_app.svg | 1 + assets/undraw/undraw_trip.svg | 1 + assets/undraw/undraw_under_construction.svg | 1 + lib/main.dart | 63 +++++ pubspec.lock | 266 ++++++++++++++++++++ pubspec.yaml | 94 +++++++ 23 files changed, 491 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 assets/undraw/REF create mode 100644 assets/undraw/undraw_couple.svg create mode 100644 assets/undraw/undraw_dog.svg create mode 100644 assets/undraw/undraw_family.svg create mode 100644 assets/undraw/undraw_file_manager.svg create mode 100644 assets/undraw/undraw_gifts.svg create mode 100644 assets/undraw/undraw_gone_shopping.svg create mode 100644 assets/undraw/undraw_greek_freak.svg create mode 100644 assets/undraw/undraw_jewelry.svg create mode 100644 assets/undraw/undraw_mobile_login.svg create mode 100644 assets/undraw/undraw_online_connection.svg create mode 100644 assets/undraw/undraw_online_groceries.svg create mode 100644 assets/undraw/undraw_pizza_sharing.svg create mode 100644 assets/undraw/undraw_progressive_app.svg create mode 100644 assets/undraw/undraw_sculpting.svg create mode 100644 assets/undraw/undraw_shopping_app.svg create mode 100644 assets/undraw/undraw_trip.svg create mode 100644 assets/undraw/undraw_under_construction.svg create mode 100644 lib/main.dart create mode 100644 pubspec.lock create mode 100644 pubspec.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..73ec940 --- /dev/null +++ b/.gitignore @@ -0,0 +1,47 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release + +.vscode/ +.idea/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..16f26c7 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Official Outbag App +Source code of the official outbag app, +written in flutter. diff --git a/assets/undraw/REF b/assets/undraw/REF new file mode 100644 index 0000000..aa90147 --- /dev/null +++ b/assets/undraw/REF @@ -0,0 +1 @@ +https://undraw.co diff --git a/assets/undraw/undraw_couple.svg b/assets/undraw/undraw_couple.svg new file mode 100644 index 0000000..6ddeb2e --- /dev/null +++ b/assets/undraw/undraw_couple.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/undraw/undraw_dog.svg b/assets/undraw/undraw_dog.svg new file mode 100644 index 0000000..c76c9db --- /dev/null +++ b/assets/undraw/undraw_dog.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/undraw/undraw_family.svg b/assets/undraw/undraw_family.svg new file mode 100644 index 0000000..497b602 --- /dev/null +++ b/assets/undraw/undraw_family.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/undraw/undraw_file_manager.svg b/assets/undraw/undraw_file_manager.svg new file mode 100644 index 0000000..cec9fba --- /dev/null +++ b/assets/undraw/undraw_file_manager.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/undraw/undraw_gifts.svg b/assets/undraw/undraw_gifts.svg new file mode 100644 index 0000000..07b3cf3 --- /dev/null +++ b/assets/undraw/undraw_gifts.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/undraw/undraw_gone_shopping.svg b/assets/undraw/undraw_gone_shopping.svg new file mode 100644 index 0000000..d994a4c --- /dev/null +++ b/assets/undraw/undraw_gone_shopping.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/undraw/undraw_greek_freak.svg b/assets/undraw/undraw_greek_freak.svg new file mode 100644 index 0000000..d921612 --- /dev/null +++ b/assets/undraw/undraw_greek_freak.svg @@ -0,0 +1 @@ +greek_freak \ No newline at end of file diff --git a/assets/undraw/undraw_jewelry.svg b/assets/undraw/undraw_jewelry.svg new file mode 100644 index 0000000..8c47281 --- /dev/null +++ b/assets/undraw/undraw_jewelry.svg @@ -0,0 +1 @@ +jewelleries \ No newline at end of file diff --git a/assets/undraw/undraw_mobile_login.svg b/assets/undraw/undraw_mobile_login.svg new file mode 100644 index 0000000..831d2b1 --- /dev/null +++ b/assets/undraw/undraw_mobile_login.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/undraw/undraw_online_connection.svg b/assets/undraw/undraw_online_connection.svg new file mode 100644 index 0000000..aa8b0a9 --- /dev/null +++ b/assets/undraw/undraw_online_connection.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/undraw/undraw_online_groceries.svg b/assets/undraw/undraw_online_groceries.svg new file mode 100644 index 0000000..291a599 --- /dev/null +++ b/assets/undraw/undraw_online_groceries.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/undraw/undraw_pizza_sharing.svg b/assets/undraw/undraw_pizza_sharing.svg new file mode 100644 index 0000000..1d04858 --- /dev/null +++ b/assets/undraw/undraw_pizza_sharing.svg @@ -0,0 +1 @@ +pizza sharing \ No newline at end of file diff --git a/assets/undraw/undraw_progressive_app.svg b/assets/undraw/undraw_progressive_app.svg new file mode 100644 index 0000000..8210d74 --- /dev/null +++ b/assets/undraw/undraw_progressive_app.svg @@ -0,0 +1 @@ +progressive_app \ No newline at end of file diff --git a/assets/undraw/undraw_sculpting.svg b/assets/undraw/undraw_sculpting.svg new file mode 100644 index 0000000..ced6d4f --- /dev/null +++ b/assets/undraw/undraw_sculpting.svg @@ -0,0 +1 @@ +sculpting \ No newline at end of file diff --git a/assets/undraw/undraw_shopping_app.svg b/assets/undraw/undraw_shopping_app.svg new file mode 100644 index 0000000..e6674a8 --- /dev/null +++ b/assets/undraw/undraw_shopping_app.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/undraw/undraw_trip.svg b/assets/undraw/undraw_trip.svg new file mode 100644 index 0000000..cacde88 --- /dev/null +++ b/assets/undraw/undraw_trip.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/undraw/undraw_under_construction.svg b/assets/undraw/undraw_under_construction.svg new file mode 100644 index 0000000..456a8f0 --- /dev/null +++ b/assets/undraw/undraw_under_construction.svg @@ -0,0 +1 @@ +under construction \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..fb402bd --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,63 @@ +import 'package:flutter/material.dart'; +import './screens/home.dart'; +import './screens/welcome.dart'; +import './screens/room.dart'; +import 'package:routemaster/routemaster.dart'; + +// routes when user is logged in +final routesLoggedIn = RouteMap(routes: { + '/': (_) => const MaterialPage(child: HomePage()), + '/r/:server/:tag/:page': (info) => MaterialPage( + child: RoomPage(info.pathParameters['server'] ?? "", + info.pathParameters['tag'] ?? "", + page: info.pathParameters['page'] ?? ""), + ) +}); +// routes when user is not logged in +final routesUnauthorized = RouteMap( + routes: { + '/welcome/': (_) => const MaterialPage(child: WelcomePage()), + '/signin': (_) => const MaterialPage(child: HomePage()), + '/signup': (_) => const MaterialPage(child: HomePage()), + }, + onUnknownRoute: (_) => const Redirect('/welcome') +); + +void main() { + runApp(const OutbagApp()); +} + +class OutbagApp extends StatefulWidget { + const OutbagApp({super.key}); + + @override + State createState() => _OutbagAppState(); +} + +class _OutbagAppState extends State { + bool isAuthorized = false; + + @override + void initState() { + super.initState(); + + // TODO: try to login user, + // with existing details + } + + @override + Widget build(BuildContext context) { + return MaterialApp.router( + title: "Outbag", + // TODO: change back to system (or load from disk) + //themeMode: ThemeMode.system, + themeMode: ThemeMode.dark, + theme: ThemeData(useMaterial3: true, brightness: Brightness.light), + darkTheme: ThemeData(useMaterial3: true, brightness: Brightness.dark), + routerDelegate: RoutemasterDelegate( + routesBuilder: (context) => + isAuthorized ? routesLoggedIn : routesUnauthorized), + routeInformationParser: const RoutemasterParser(), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..c7193ff --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,266 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + args: + dependency: transitive + description: + name: args + sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + async: + dependency: transitive + description: + name: async + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" + source: hosted + version: "2.10.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" + source: hosted + version: "1.2.1" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" + source: hosted + version: "1.17.0" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + url: "https://pub.dev" + source: hosted + version: "1.0.5" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + url: "https://pub.dev" + source: hosted + version: "2.0.1" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: "12006889e2987c549c4c1ec1a5ba4ec4b24d34d2469ee5f9476c926dcecff266" + url: "https://pub.dev" + source: hosted + version: "2.0.4" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + js: + dependency: transitive + description: + name: js + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" + source: hosted + version: "0.6.5" + lints: + dependency: transitive + description: + name: lints + sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + url: "https://pub.dev" + source: hosted + version: "2.0.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" + source: hosted + version: "0.12.13" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + meta: + dependency: transitive + description: + name: meta + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" + source: hosted + version: "1.8.0" + path: + dependency: transitive + description: + name: path + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + url: "https://pub.dev" + source: hosted + version: "1.8.2" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + url: "https://pub.dev" + source: hosted + version: "5.1.0" + routemaster: + dependency: "direct main" + description: + name: routemaster + sha256: b3b10b6ee31c741b453091e6b33323cc96631b19e4a14fc6069e9de056c7311c + url: "https://pub.dev" + source: hosted + version: "1.0.1" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" + source: hosted + version: "1.9.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" + source: hosted + version: "1.11.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" + source: hosted + version: "0.4.16" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "4cf8e60dbe4d3a693d37dff11255a172594c0793da542183cbfe7fe978ae4aaa" + url: "https://pub.dev" + source: hosted + version: "1.1.4" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "278ad5f816f58b1967396d1f78ced470e3e58c9fe4b27010102c0a595c764468" + url: "https://pub.dev" + source: hosted + version: "1.1.4" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "0bf61ad56e6fd6688a2865d3ceaea396bc6a0a90ea0d7ad5049b1b76c09d6163" + url: "https://pub.dev" + source: hosted + version: "1.1.4" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + xml: + dependency: transitive + description: + name: xml + sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + url: "https://pub.dev" + source: hosted + version: "6.2.2" +sdks: + dart: ">=2.19.3 <3.0.0" + flutter: ">=3.7.0-0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..3624cc0 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,94 @@ +name: outbag_app +description: Official Outbag App +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 1.0.0+1 + +environment: + sdk: '>=2.19.3 <3.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# 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 +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + routemaster: ^1.0.1 + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + flutter_svg: ^2.0.4 + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + assets: + - assets/ + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages