@ -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 |
||||
|
||||
# Aurora generated |
||||
/aurora/flutter |
@ -0,0 +1,30 @@
|
||||
# This file tracks properties of this Flutter project. |
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc. |
||||
# |
||||
# This file should be version controlled. |
||||
|
||||
version: |
||||
revision: 135454af32477f815a7525073027a3ff9eff1bfd |
||||
channel: aurora |
||||
|
||||
project_type: app |
||||
|
||||
# Tracks metadata for the flutter migrate command |
||||
migration: |
||||
platforms: |
||||
- platform: root |
||||
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd |
||||
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd |
||||
- platform: aurora |
||||
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd |
||||
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd |
||||
|
||||
# User provided section |
||||
|
||||
# List of Local paths (relative to this file) that should be |
||||
# ignored by the migrate tool. |
||||
# |
||||
# Files that are not part of the templates will be ignored by default. |
||||
unmanaged_files: |
||||
- 'lib/main.dart' |
||||
- 'ios/Runner.xcodeproj/project.pbxproj' |
@ -0,0 +1,16 @@
|
||||
# flutter_example_packages |
||||
|
||||
A new Flutter project. |
||||
|
||||
## Getting Started |
||||
|
||||
This project is a starting point for a Flutter application. |
||||
|
||||
A few resources to get you started if this is your first Flutter project: |
||||
|
||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) |
||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) |
||||
|
||||
For help getting started with Flutter development, view the |
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials, |
||||
samples, guidance on mobile development, and a full API reference. |
@ -0,0 +1 @@
|
||||
include: package:flutter_lints/flutter.yaml |
After Width: | Height: | Size: 18 KiB |
@ -0,0 +1,47 @@
|
||||
cmake_minimum_required(VERSION 3.10) |
||||
project(ru.auroraos.flutter_example_packages LANGUAGES CXX) |
||||
|
||||
include(GNUInstallDirs) |
||||
|
||||
set(BINARY_NAME ${CMAKE_PROJECT_NAME}) |
||||
set(FLUTTER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/flutter) |
||||
|
||||
set(CMAKE_CXX_STANDARD 17) |
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON) |
||||
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra") |
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3") |
||||
|
||||
set(CMAKE_SKIP_RPATH OFF) |
||||
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../share/${BINARY_NAME}/lib") |
||||
|
||||
find_package(PkgConfig REQUIRED) |
||||
pkg_check_modules(FlutterEmbedder REQUIRED IMPORTED_TARGET flutter-embedder) |
||||
|
||||
add_executable(${BINARY_NAME} main.cpp ${FLUTTER_DIR}/generated_plugin_registrant.cpp) |
||||
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::FlutterEmbedder) |
||||
target_include_directories(${BINARY_NAME} PRIVATE ${FLUTTER_DIR}) |
||||
|
||||
include(flutter/generated_plugins.cmake) |
||||
|
||||
set(PACKAGE_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/${BINARY_NAME}) |
||||
set(DESKTOP_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/applications) |
||||
set(ICONS_INSTALL_ROOT_DIR ${CMAKE_INSTALL_DATADIR}/icons/hicolor) |
||||
|
||||
add_custom_command(TARGET ${BINARY_NAME} POST_BUILD |
||||
COMMAND ${CMAKE_COMMAND} -E copy |
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libflutter-embedder.so |
||||
${PROJECT_BINARY_DIR}/bundle/lib/libflutter-embedder.so) |
||||
|
||||
install(FILES ${PROJECT_BINARY_DIR}/bundle/icudtl.dat DESTINATION ${PACKAGE_INSTALL_DIR}) |
||||
install(DIRECTORY ${PROJECT_BINARY_DIR}/bundle/flutter_assets DESTINATION ${PACKAGE_INSTALL_DIR}) |
||||
install(DIRECTORY ${PROJECT_BINARY_DIR}/bundle/lib DESTINATION ${PACKAGE_INSTALL_DIR}) |
||||
|
||||
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |
||||
install(FILES desktop/${BINARY_NAME}.desktop DESTINATION ${DESKTOP_INSTALL_DIR}) |
||||
|
||||
foreach(ICONS_SIZE 86x86 108x108 128x128 172x172) |
||||
install(FILES icons/${ICONS_SIZE}.png |
||||
RENAME ${BINARY_NAME}.png |
||||
DESTINATION ${ICONS_INSTALL_ROOT_DIR}/${ICONS_SIZE}/apps/) |
||||
endforeach(ICONS_SIZE) |
@ -0,0 +1,12 @@
|
||||
[Desktop Entry] |
||||
Type=Application |
||||
Name=Flutter example packages |
||||
Comment=Application demonstrating the work of plugins. |
||||
Icon=ru.auroraos.flutter_example_packages |
||||
Exec=/usr/bin/ru.auroraos.flutter_example_packages |
||||
X-Nemo-Application-Type=silica-qt5 |
||||
|
||||
[X-Application] |
||||
Permissions= |
||||
OrganizationName=ru.auroraos |
||||
ApplicationName=flutter_example_packages |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 3.3 KiB |
@ -0,0 +1,9 @@
|
||||
#include <flutter/application.h> |
||||
#include "generated_plugin_registrant.h" |
||||
|
||||
int main(int argc, char *argv[]) { |
||||
Application::Initialize(argc, argv); |
||||
RegisterPlugins(); |
||||
Application::Launch(); |
||||
return 0; |
||||
} |
@ -0,0 +1,31 @@
|
||||
%global __provides_exclude_from ^%{_datadir}/%{name}/lib/.*$ |
||||
%global __requires_exclude ^lib(dconf|flutter-embedder|maliit-glib|appmanifest-.+|.+_platform_plugin)\\.so.*$ |
||||
|
||||
Name: ru.auroraos.flutter_example_packages |
||||
Summary: A new Flutter project. |
||||
Version: 0.1.0 |
||||
Release: 1 |
||||
License: Proprietary |
||||
Source0: %{name}-%{version}.tar.zst |
||||
|
||||
BuildRequires: cmake |
||||
BuildRequires: pkgconfig(flutter-embedder) |
||||
|
||||
%description |
||||
%{summary}. |
||||
|
||||
%prep |
||||
%autosetup |
||||
|
||||
%build |
||||
%cmake -DCMAKE_BUILD_TYPE=%{_flutter_build_type} |
||||
%make_build |
||||
|
||||
%install |
||||
%make_install |
||||
|
||||
%files |
||||
%{_bindir}/%{name} |
||||
%{_datadir}/%{name}/* |
||||
%{_datadir}/applications/%{name}.desktop |
||||
%{_datadir}/icons/hicolor/*/apps/%{name}.png |
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,2 @@
|
||||
https://iconduck.com/icons/94312/flutter |
||||
https://iconduck.com/icons/54169/package |
@ -0,0 +1,3 @@
|
||||
arb-dir: lib/l10n |
||||
template-arb-file: app_en.arb |
||||
output-localization-file: app_localizations.dart |
@ -0,0 +1,33 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
import 'package:flutter_example_packages/model.dart'; |
||||
import 'package:flutter_example_packages/pages/home/page.dart'; |
||||
import 'package:flutter_example_packages/pages/xdga_directories/page.dart'; |
||||
import 'package:flutter_example_packages/theme/theme.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; |
||||
|
||||
/// Main app class |
||||
class MyApp extends StatelessWidget { |
||||
const MyApp({super.key}); |
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return ScopedModel<AppModel>( |
||||
model: getIt<AppModel>(), |
||||
child: ScopedModelDescendant<AppModel>( |
||||
builder: (context, child, model) => MaterialApp( |
||||
localizationsDelegates: AppLocalizations.localizationsDelegates, |
||||
supportedLocales: AppLocalizations.supportedLocales, |
||||
title: 'Flutter Aurora OS', |
||||
theme: appTheme, |
||||
initialRoute: '/', |
||||
routes: { |
||||
'/': (context) => const HomePage(), |
||||
'/xdga_directories': (context) => const XdgaDirectoriesPage(), |
||||
}, |
||||
), |
||||
), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,3 @@
|
||||
abstract class BuildConfig { |
||||
bool get isDebug; |
||||
} |
@ -0,0 +1,6 @@
|
||||
import 'build.config.dart'; |
||||
|
||||
class BuildDebugConfig implements BuildConfig { |
||||
@override |
||||
bool get isDebug => true; |
||||
} |
@ -0,0 +1,6 @@
|
||||
import 'build.config.dart'; |
||||
|
||||
class BuildReleaseConfig implements BuildConfig { |
||||
@override |
||||
bool get isDebug => false; |
||||
} |
@ -1,25 +1,35 @@
|
||||
import 'package:flutter_example_packages/base/build/build.config.dart'; |
||||
import 'package:flutter_example_packages/model.dart'; |
||||
import 'package:flutter_example_packages/pages/battery_plus/model.dart'; |
||||
import 'package:flutter_example_packages/pages/device_info_plus/model.dart'; |
||||
import 'package:flutter_example_packages/pages/flutter_local_notifications/model.dart'; |
||||
import 'package:flutter_example_packages/pages/flutter_secure_storage/model.dart'; |
||||
import 'package:flutter_example_packages/pages/home/model.dart'; |
||||
import 'package:flutter_example_packages/pages/package_info_plus/model.dart'; |
||||
import 'package:flutter_example_packages/pages/path_provider/model.dart'; |
||||
import 'package:flutter_example_packages/pages/shared_preferences/model.dart'; |
||||
import 'package:flutter_example_packages/pages/wakelock/model.dart'; |
||||
import 'package:flutter_example_packages/pages/xdga_directories/model.dart'; |
||||
import 'package:get_it/get_it.dart'; |
||||
|
||||
final getIt = GetIt.instance; |
||||
|
||||
/// Initialization application DI |
||||
void setupDI(BuildConfig config) { |
||||
final dio = configureDio(url: config.baseUrl); |
||||
getIt |
||||
// build info |
||||
// build info |
||||
..registerSingleton<BuildConfig>(config) |
||||
// services |
||||
..registerSingleton<AuthService>(AuthService(dio)) |
||||
..registerSingleton<UsersService>(UsersService(dio)) |
||||
..registerSingleton<CardsService>(CardsService(dio)) |
||||
// pages models |
||||
// pages models |
||||
..registerFactory<HomeModel>(() => HomeModel()) |
||||
..registerFactory<SignInModel>(() => SignInModel()) |
||||
..registerFactory<SignUpModel>(() => SignUpModel()) |
||||
..registerFactory<CardModel>(() => CardModel()) |
||||
..registerFactory<CardsModel>(() => CardsModel()) |
||||
..registerFactory<StatsModel>(() => StatsModel()) |
||||
..registerFactory<FriendsModel>(() => FriendsModel()) |
||||
// other |
||||
..registerFactory<BatteryPlusModel>(() => BatteryPlusModel()) |
||||
..registerFactory<DeviceInfoPlusModel>(() => DeviceInfoPlusModel()) |
||||
..registerFactory<FlutterLocalNotificationsModel>(() => FlutterLocalNotificationsModel()) |
||||
..registerFactory<FlutterSecureStorageModel>(() => FlutterSecureStorageModel()) |
||||
..registerFactory<PackageInfoPlusModel>(() => PackageInfoPlusModel()) |
||||
..registerFactory<PathProviderModel>(() => PathProviderModel()) |
||||
..registerFactory<SharedPreferencesModel>(() => SharedPreferencesModel()) |
||||
..registerFactory<WakelockModel>(() => WakelockModel()) |
||||
..registerFactory<XdgaDirectoriesModel>(() => XdgaDirectoriesModel()) |
||||
// other |
||||
..registerSingleton<AppModel>(AppModel()); |
||||
} |
@ -0,0 +1,18 @@
|
||||
import 'package:flutter/material.dart'; |
||||
|
||||
/// Extensions for [GlobalKey] |
||||
extension ExtGlobalKey on GlobalKey { |
||||
/// Get height by key |
||||
double? getHeight() { |
||||
if (currentContext == null) { |
||||
return null; |
||||
} |
||||
try { |
||||
final renderBoxRed = currentContext!.findRenderObject() as RenderBox; |
||||
final sizeRed = renderBoxRed.size; |
||||
return sizeRed.height; |
||||
} catch (e) { |
||||
return 0; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,3 @@
|
||||
{ |
||||
"helloPageTitle": "Flutter Aurora OS" |
||||
} |
@ -0,0 +1,3 @@
|
||||
{ |
||||
"helloPageTitle": "Flutter ОС Аврора" |
||||
} |
@ -0,0 +1,9 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/app.dart'; |
||||
import 'package:flutter_example_packages/base/build/build.release.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
|
||||
void main() { |
||||
setupDI(BuildReleaseConfig()); |
||||
runApp(const MyApp()); |
||||
} |
@ -0,0 +1,9 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/app.dart'; |
||||
import 'package:flutter_example_packages/base/build/build.debug.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
|
||||
void main() { |
||||
setupDI(BuildDebugConfig()); |
||||
runApp(const MyApp()); |
||||
} |
@ -0,0 +1,8 @@
|
||||
import 'package:flutter/widgets.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
/// Global model for app |
||||
class AppModel extends Model { |
||||
/// Get [ScopedModel] |
||||
static AppModel of(BuildContext context) => ScopedModel.of<AppModel>(context); |
||||
} |
@ -0,0 +1,8 @@
|
||||
import 'package:flutter/widgets.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
/// Model for [BatteryPlusPage] |
||||
class BatteryPlusModel extends Model { |
||||
/// Get [ScopedModel] |
||||
static BatteryPlusModel of(BuildContext context) => ScopedModel.of<BatteryPlusModel>(context); |
||||
} |
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
import 'package:flutter_example_packages/pages/battery_plus/model.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
class BatteryPlusPage extends StatefulWidget { |
||||
const BatteryPlusPage({ |
||||
super.key, |
||||
}); |
||||
|
||||
@override |
||||
State<BatteryPlusPage> createState() => _BatteryPlusPageState(); |
||||
} |
||||
|
||||
class _BatteryPlusPageState extends State<BatteryPlusPage> { |
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return ScopedModel<BatteryPlusModel>( |
||||
model: getIt<BatteryPlusModel>(), |
||||
child: ScopedModelDescendant<BatteryPlusModel>(builder: (context, child, model) { |
||||
return Wrap( |
||||
spacing: 20, |
||||
runSpacing: 20, |
||||
children: const [ |
||||
Text("data"), |
||||
], |
||||
); |
||||
}), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,8 @@
|
||||
import 'package:flutter/widgets.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
/// Model for [DeviceInfoPlusPage] |
||||
class DeviceInfoPlusModel extends Model { |
||||
/// Get [ScopedModel] |
||||
static DeviceInfoPlusModel of(BuildContext context) => ScopedModel.of<DeviceInfoPlusModel>(context); |
||||
} |
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
import 'package:flutter_example_packages/pages/device_info_plus/model.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
class DeviceInfoPlusPage extends StatefulWidget { |
||||
const DeviceInfoPlusPage({ |
||||
super.key, |
||||
}); |
||||
|
||||
@override |
||||
State<DeviceInfoPlusPage> createState() => _DeviceInfoPlusPageState(); |
||||
} |
||||
|
||||
class _DeviceInfoPlusPageState extends State<DeviceInfoPlusPage> { |
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return ScopedModel<DeviceInfoPlusModel>( |
||||
model: getIt<DeviceInfoPlusModel>(), |
||||
child: ScopedModelDescendant<DeviceInfoPlusModel>(builder: (context, child, model) { |
||||
return Wrap( |
||||
spacing: 20, |
||||
runSpacing: 20, |
||||
children: const [ |
||||
Text("data"), |
||||
], |
||||
); |
||||
}), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,8 @@
|
||||
import 'package:flutter/widgets.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
/// Model for [FlutterLocalNotificationsPage] |
||||
class FlutterLocalNotificationsModel extends Model { |
||||
/// Get [ScopedModel] |
||||
static FlutterLocalNotificationsModel of(BuildContext context) => ScopedModel.of<FlutterLocalNotificationsModel>(context); |
||||
} |
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
import 'package:flutter_example_packages/pages/flutter_local_notifications/model.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
class FlutterLocalNotificationsPage extends StatefulWidget { |
||||
const FlutterLocalNotificationsPage({ |
||||
super.key, |
||||
}); |
||||
|
||||
@override |
||||
State<FlutterLocalNotificationsPage> createState() => _FlutterLocalNotificationsPageState(); |
||||
} |
||||
|
||||
class _FlutterLocalNotificationsPageState extends State<FlutterLocalNotificationsPage> { |
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return ScopedModel<FlutterLocalNotificationsModel>( |
||||
model: getIt<FlutterLocalNotificationsModel>(), |
||||
child: ScopedModelDescendant<FlutterLocalNotificationsModel>(builder: (context, child, model) { |
||||
return Wrap( |
||||
spacing: 20, |
||||
runSpacing: 20, |
||||
children: const [ |
||||
Text("data"), |
||||
], |
||||
); |
||||
}), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,8 @@
|
||||
import 'package:flutter/widgets.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
/// Model for [FlutterSecureStoragePage] |
||||
class FlutterSecureStorageModel extends Model { |
||||
/// Get [ScopedModel] |
||||
static FlutterSecureStorageModel of(BuildContext context) => ScopedModel.of<FlutterSecureStorageModel>(context); |
||||
} |
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
import 'package:flutter_example_packages/pages/flutter_secure_storage/model.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
class FlutterSecureStoragePage extends StatefulWidget { |
||||
const FlutterSecureStoragePage({ |
||||
super.key, |
||||
}); |
||||
|
||||
@override |
||||
State<FlutterSecureStoragePage> createState() => _FlutterSecureStoragePageState(); |
||||
} |
||||
|
||||
class _FlutterSecureStoragePageState extends State<FlutterSecureStoragePage> { |
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return ScopedModel<FlutterSecureStorageModel>( |
||||
model: getIt<FlutterSecureStorageModel>(), |
||||
child: ScopedModelDescendant<FlutterSecureStorageModel>(builder: (context, child, model) { |
||||
return Wrap( |
||||
spacing: 20, |
||||
runSpacing: 20, |
||||
children: const [ |
||||
Text("data"), |
||||
], |
||||
); |
||||
}), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,8 @@
|
||||
import 'package:flutter/widgets.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
/// Model for [HomePage] |
||||
class HomeModel extends Model { |
||||
/// Get [ScopedModel] |
||||
static HomeModel of(BuildContext context) => ScopedModel.of<HomeModel>(context); |
||||
} |
@ -0,0 +1,237 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
import 'package:flutter_example_packages/extensions/keys_ext.dart'; |
||||
import 'package:flutter_example_packages/pages/home/model.dart'; |
||||
import 'package:flutter_example_packages/theme/colors.dart'; |
||||
import 'package:flutter_example_packages/theme/radius.dart'; |
||||
import 'package:flutter_example_packages/widgets/layouts/page_layout.dart'; |
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
class HomePage extends StatefulWidget { |
||||
const HomePage({ |
||||
super.key, |
||||
}); |
||||
|
||||
@override |
||||
State<HomePage> createState() => _HomePageState(); |
||||
} |
||||
|
||||
class _HomePageState extends State<HomePage> { |
||||
double _hH = 0; |
||||
final _header = GlobalKey(); |
||||
|
||||
@override |
||||
void initState() { |
||||
super.initState(); |
||||
WidgetsBinding.instance.addPostFrameCallback((_) => setState(() { |
||||
_hH = _header.getHeight() ?? 0; |
||||
Future.delayed(const Duration(milliseconds: 100), () { |
||||
setState(() { |
||||
_hH = _header.getHeight() ?? 0; |
||||
}); |
||||
}); |
||||
Future.delayed(const Duration(milliseconds: 200), () { |
||||
setState(() { |
||||
_hH = _header.getHeight() ?? 0; |
||||
}); |
||||
}); |
||||
})); |
||||
} |
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
final theme = Theme.of(context); |
||||
final localizations = AppLocalizations.of(context)!; |
||||
|
||||
return PageLayout( |
||||
child: ScopedModel<HomeModel>( |
||||
model: getIt<HomeModel>(), |
||||
child: ScopedModelDescendant<HomeModel>( |
||||
builder: (context, child, model) { |
||||
return Stack( |
||||
children: [ |
||||
Container( |
||||
height: _hH > 0 ? _hH : 0, |
||||
color: AppColors.primary, |
||||
width: double.infinity, |
||||
child: Center( |
||||
child: Align( |
||||
alignment: FractionalOffset.bottomRight, |
||||
child: Padding( |
||||
padding: const EdgeInsets.only( |
||||
left: 20, right: 20, top: 0, bottom: 40), |
||||
child: Opacity( |
||||
opacity: 0.3, |
||||
child: Image.asset( |
||||
'images/logo-head.png', |
||||
width: 250, |
||||
), |
||||
), |
||||
), |
||||
), |
||||
), |
||||
), |
||||
Container( |
||||
key: _header, |
||||
width: double.infinity, |
||||
padding: const EdgeInsets.only( |
||||
left: 20, right: 20, top: 30, bottom: 120), |
||||
child: Column( |
||||
mainAxisSize: MainAxisSize.min, |
||||
crossAxisAlignment: CrossAxisAlignment.start, |
||||
children: [ |
||||
Text( |
||||
"Welcome!", |
||||
textAlign: TextAlign.left, |
||||
style: theme.textTheme.titleLarge?.copyWith( |
||||
color: const Color(0xFF3c67b5), |
||||
), |
||||
), |
||||
const SizedBox(height: 50), |
||||
Text( |
||||
"In this application you can find 100500 plugins supporting Aurors OS. If it happens that something is missing for you, you can write to us or add it yourself.", |
||||
textAlign: TextAlign.left, |
||||
style: theme.textTheme.bodyLarge?.copyWith( |
||||
color: const Color(0xFF3c67b5), |
||||
height: 1.5, |
||||
), |
||||
), |
||||
], |
||||
), |
||||
), |
||||
ListView.builder( |
||||
padding: EdgeInsets.only(top: _hH > 0 ? _hH - 16 : 0), |
||||
itemCount: 20, |
||||
itemBuilder: (context, index) { |
||||
final i = index; |
||||
return Container( |
||||
decoration: BoxDecoration( |
||||
color: Colors.white, |
||||
borderRadius: i == 0 |
||||
? const BorderRadius.only( |
||||
topLeft: Radius.circular(20), |
||||
topRight: Radius.circular(20), |
||||
) |
||||
: null, |
||||
), |
||||
child: Padding( |
||||
padding: i == 0 |
||||
? const EdgeInsets.only( |
||||
left: 20, right: 20, top: 20, bottom: 0) |
||||
: const EdgeInsets.symmetric(horizontal: 20), |
||||
child: Column( |
||||
children: [ |
||||
Stack( |
||||
children: [ |
||||
Padding( |
||||
padding: const EdgeInsets.only(top: 10), |
||||
child: Stack( |
||||
children: [ |
||||
SizedBox( |
||||
width: double.infinity, |
||||
child: Card( |
||||
child: Padding( |
||||
padding: const EdgeInsets.all(20), |
||||
child: Column( |
||||
crossAxisAlignment: |
||||
CrossAxisAlignment.start, |
||||
children: [ |
||||
Text( |
||||
'battery_plus', |
||||
textAlign: TextAlign.left, |
||||
style: theme |
||||
.textTheme.titleSmall, |
||||
), |
||||
const SizedBox(height: 10), |
||||
Text( |
||||
'A Flutter plugin to access various information about the battery of the device the app is running on.', |
||||
textAlign: TextAlign.left, |
||||
style: theme |
||||
.textTheme.bodyMedium |
||||
?.copyWith( |
||||
color: Colors.black |
||||
.withOpacity( |
||||
0.6)), |
||||
), |
||||
const SizedBox(height: 12), |
||||
Divider( |
||||
height: 1, |
||||
color: |
||||
const Color(0xFF3c67b5) |
||||
.withOpacity(0.2)), |
||||
const SizedBox(height: 12), |
||||
Text( |
||||
'Version: 4.0.1', |
||||
textAlign: TextAlign.left, |
||||
style: theme.textTheme.caption |
||||
?.copyWith( |
||||
color: const Color( |
||||
0xFF3c67b5) |
||||
.withOpacity( |
||||
0.7)), |
||||
), |
||||
], |
||||
), |
||||
), |
||||
), |
||||
), |
||||
Positioned.fill( |
||||
child: Material( |
||||
color: Colors.transparent, |
||||
child: InkWell( |
||||
customBorder: |
||||
RoundedRectangleBorder( |
||||
borderRadius: AppRadius.small, |
||||
), |
||||
hoverColor: Colors.transparent, |
||||
onTap: () => debugPrint("click"), |
||||
), |
||||
), |
||||
), |
||||
], |
||||
), |
||||
), |
||||
Align( |
||||
alignment: FractionalOffset.topRight, |
||||
child: Container( |
||||
margin: const EdgeInsets.only(right: 16), |
||||
decoration: BoxDecoration( |
||||
color: i % 2 == 0 |
||||
? Colors.orange |
||||
: Colors.blueAccent, |
||||
borderRadius: AppRadius.small, |
||||
), |
||||
child: Padding( |
||||
padding: const EdgeInsets.all(6), |
||||
child: Text( |
||||
i % 2 == 0 |
||||
? 'platform dependent' |
||||
: 'platform independent', |
||||
textAlign: TextAlign.left, |
||||
style: |
||||
theme.textTheme.caption?.copyWith( |
||||
color: Colors.white, |
||||
fontWeight: FontWeight.w100, |
||||
), |
||||
), |
||||
), |
||||
), |
||||
), |
||||
], |
||||
), |
||||
const SizedBox(height: 20), |
||||
], |
||||
), |
||||
), |
||||
); |
||||
}, |
||||
), |
||||
], |
||||
); |
||||
}, |
||||
), |
||||
), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,8 @@
|
||||
import 'package:flutter/widgets.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
/// Model for [PackageInfoPlusPage] |
||||
class PackageInfoPlusModel extends Model { |
||||
/// Get [ScopedModel] |
||||
static PackageInfoPlusModel of(BuildContext context) => ScopedModel.of<PackageInfoPlusModel>(context); |
||||
} |
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
import 'package:flutter_example_packages/pages/package_info_plus/model.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
class PackageInfoPlusPage extends StatefulWidget { |
||||
const PackageInfoPlusPage({ |
||||
super.key, |
||||
}); |
||||
|
||||
@override |
||||
State<PackageInfoPlusPage> createState() => _PackageInfoPlusPageState(); |
||||
} |
||||
|
||||
class _PackageInfoPlusPageState extends State<PackageInfoPlusPage> { |
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return ScopedModel<PackageInfoPlusModel>( |
||||
model: getIt<PackageInfoPlusModel>(), |
||||
child: ScopedModelDescendant<PackageInfoPlusModel>(builder: (context, child, model) { |
||||
return Wrap( |
||||
spacing: 20, |
||||
runSpacing: 20, |
||||
children: const [ |
||||
Text("data"), |
||||
], |
||||
); |
||||
}), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,8 @@
|
||||
import 'package:flutter/widgets.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
/// Model for [PathProviderPage] |
||||
class PathProviderModel extends Model { |
||||
/// Get [ScopedModel] |
||||
static PathProviderModel of(BuildContext context) => ScopedModel.of<PathProviderModel>(context); |
||||
} |
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
import 'package:flutter_example_packages/pages/path_provider/model.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
class PathProviderPage extends StatefulWidget { |
||||
const PathProviderPage({ |
||||
super.key, |
||||
}); |
||||
|
||||
@override |
||||
State<PathProviderPage> createState() => _PathProviderPageState(); |
||||
} |
||||
|
||||
class _PathProviderPageState extends State<PathProviderPage> { |
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return ScopedModel<PathProviderModel>( |
||||
model: getIt<PathProviderModel>(), |
||||
child: ScopedModelDescendant<PathProviderModel>(builder: (context, child, model) { |
||||
return Wrap( |
||||
spacing: 20, |
||||
runSpacing: 20, |
||||
children: const [ |
||||
Text("data"), |
||||
], |
||||
); |
||||
}), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,8 @@
|
||||
import 'package:flutter/widgets.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
/// Model for [SharedPreferencesPage] |
||||
class SharedPreferencesModel extends Model { |
||||
/// Get [ScopedModel] |
||||
static SharedPreferencesModel of(BuildContext context) => ScopedModel.of<SharedPreferencesModel>(context); |
||||
} |
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
import 'package:flutter_example_packages/pages/shared_preferences/model.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
class SharedPreferencesPage extends StatefulWidget { |
||||
const SharedPreferencesPage({ |
||||
super.key, |
||||
}); |
||||
|
||||
@override |
||||
State<SharedPreferencesPage> createState() => _SharedPreferencesPageState(); |
||||
} |
||||
|
||||
class _SharedPreferencesPageState extends State<SharedPreferencesPage> { |
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return ScopedModel<SharedPreferencesModel>( |
||||
model: getIt<SharedPreferencesModel>(), |
||||
child: ScopedModelDescendant<SharedPreferencesModel>(builder: (context, child, model) { |
||||
return Wrap( |
||||
spacing: 20, |
||||
runSpacing: 20, |
||||
children: const [ |
||||
Text("data"), |
||||
], |
||||
); |
||||
}), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,8 @@
|
||||
import 'package:flutter/widgets.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
/// Model for [WakelockPage] |
||||
class WakelockModel extends Model { |
||||
/// Get [ScopedModel] |
||||
static WakelockModel of(BuildContext context) => ScopedModel.of<WakelockModel>(context); |
||||
} |
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
import 'package:flutter_example_packages/pages/wakelock/model.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
class WakelockPage extends StatefulWidget { |
||||
const WakelockPage({ |
||||
super.key, |
||||
}); |
||||
|
||||
@override |
||||
State<WakelockPage> createState() => _WakelockPageState(); |
||||
} |
||||
|
||||
class _WakelockPageState extends State<WakelockPage> { |
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return ScopedModel<WakelockModel>( |
||||
model: getIt<WakelockModel>(), |
||||
child: ScopedModelDescendant<WakelockModel>(builder: (context, child, model) { |
||||
return Wrap( |
||||
spacing: 20, |
||||
runSpacing: 20, |
||||
children: const [ |
||||
Text("data"), |
||||
], |
||||
); |
||||
}), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,8 @@
|
||||
import 'package:flutter/widgets.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
/// Model for [XdgaDirectoriesPage] |
||||
class XdgaDirectoriesModel extends Model { |
||||
/// Get [ScopedModel] |
||||
static XdgaDirectoriesModel of(BuildContext context) => ScopedModel.of<XdgaDirectoriesModel>(context); |
||||
} |
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/base/di/app_di.dart'; |
||||
import 'package:flutter_example_packages/pages/xdga_directories/model.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
|
||||
class XdgaDirectoriesPage extends StatefulWidget { |
||||
const XdgaDirectoriesPage({ |
||||
super.key, |
||||
}); |
||||
|
||||
@override |
||||
State<XdgaDirectoriesPage> createState() => _XdgaDirectoriesPageState(); |
||||
} |
||||
|
||||
class _XdgaDirectoriesPageState extends State<XdgaDirectoriesPage> { |
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return ScopedModel<XdgaDirectoriesModel>( |
||||
model: getIt<XdgaDirectoriesModel>(), |
||||
child: ScopedModelDescendant<XdgaDirectoriesModel>(builder: (context, child, model) { |
||||
return Wrap( |
||||
spacing: 20, |
||||
runSpacing: 20, |
||||
children: const [ |
||||
Text("data"), |
||||
], |
||||
); |
||||
}), |
||||
); |
||||
} |
||||
} |
@ -0,0 +1,7 @@
|
||||
import 'dart:ui'; |
||||
|
||||
class AppColors { |
||||
static const Color primary = Color(0xFFCBDCF8); |
||||
static const Color secondary = Color(0xFF00b3ad); |
||||
static const Color warning = Color(0xFFfb7d4a); |
||||
} |
@ -0,0 +1,7 @@
|
||||
import 'package:flutter/material.dart'; |
||||
|
||||
class AppRadius { |
||||
static final large = BorderRadius.circular(24.0); |
||||
static final medium = BorderRadius.circular(16.0); |
||||
static final small = BorderRadius.circular(8.0); |
||||
} |
@ -0,0 +1,54 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/theme/colors.dart'; |
||||
import 'package:flutter_example_packages/theme/radius.dart'; |
||||
import 'package:google_fonts/google_fonts.dart'; |
||||
|
||||
final appTheme = ThemeData( |
||||
colorScheme: ThemeData().colorScheme.copyWith( |
||||
primary: AppColors.primary, |
||||
secondary: AppColors.secondary, |
||||
), |
||||
cardTheme: CardTheme( |
||||
clipBehavior: Clip.antiAlias, |
||||
margin: const EdgeInsets.all(0), |
||||
color: AppColors.primary.withOpacity(0.4), |
||||
elevation: 0, |
||||
shape: RoundedRectangleBorder( |
||||
borderRadius: AppRadius.small, |
||||
), |
||||
), |
||||
|
||||
/// [Text] |
||||
textTheme: TextTheme( |
||||
headlineLarge: GoogleFonts.ubuntu( |
||||
fontSize: 60, |
||||
fontWeight: FontWeight.bold, |
||||
), |
||||
headlineMedium: GoogleFonts.ubuntu( |
||||
fontSize: 40, |
||||
fontWeight: FontWeight.bold, |
||||
), |
||||
headlineSmall: GoogleFonts.ubuntu( |
||||
fontSize: 24, |
||||
fontWeight: FontWeight.bold, |
||||
), |
||||
titleLarge: GoogleFonts.ubuntu( |
||||
fontSize: 60, |
||||
), |
||||
titleMedium: GoogleFonts.ubuntu( |
||||
fontSize: 40, |
||||
), |
||||
titleSmall: GoogleFonts.ubuntu( |
||||
fontSize: 24, |
||||
), |
||||
bodyLarge: GoogleFonts.ubuntu( |
||||
fontSize: 18, |
||||
), |
||||
bodyMedium: GoogleFonts.ubuntu( |
||||
fontSize: 16, |
||||
), |
||||
bodySmall: GoogleFonts.ubuntu( |
||||
fontSize: 12, |
||||
), |
||||
), |
||||
); |
@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_example_packages/model.dart'; |
||||
import 'package:scoped_model/scoped_model.dart'; |
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; |
||||
|
||||
class PageLayout extends StatefulWidget { |
||||
const PageLayout({ |
||||
super.key, |
||||
required this.child, |
||||
}); |
||||
|
||||
final Widget child; |
||||
|
||||
@override |
||||
State<PageLayout> createState() => _PageLayoutState(); |
||||
} |
||||
|
||||
class _PageLayoutState extends State<PageLayout> { |
||||
@override |
||||
Widget build(BuildContext context) { |
||||
final localizations = AppLocalizations.of(context)!; |
||||
return ScopedModelDescendant<AppModel>(builder: (context, child, model) { |
||||
return Localizations.override( |
||||
context: context, |
||||
child: Builder( |
||||
builder: (context) { |
||||
return Scaffold( |
||||
appBar: AppBar( |
||||
elevation: 0, |
||||
), |
||||
body: widget.child, |
||||
); |
||||
}, |
||||
), |
||||
); |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,614 @@
|
||||
# Generated by pub |
||||
# See https://dart.dev/tools/pub/glossary#lockfile |
||||
packages: |
||||
_fe_analyzer_shared: |
||||
dependency: transitive |
||||
description: |
||||
name: _fe_analyzer_shared |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "50.0.0" |
||||
analyzer: |
||||
dependency: transitive |
||||
description: |
||||
name: analyzer |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "5.2.0" |
||||
args: |
||||
dependency: transitive |
||||
description: |
||||
name: args |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.4.1" |
||||
async: |
||||
dependency: transitive |
||||
description: |
||||
name: async |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.9.0" |
||||
boolean_selector: |
||||
dependency: transitive |
||||
description: |
||||
name: boolean_selector |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.1.0" |
||||
build: |
||||
dependency: transitive |
||||
description: |
||||
name: build |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.3.1" |
||||
build_config: |
||||
dependency: transitive |
||||
description: |
||||
name: build_config |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.1.1" |
||||
build_daemon: |
||||
dependency: transitive |
||||
description: |
||||
name: build_daemon |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "3.1.1" |
||||
build_resolvers: |
||||
dependency: transitive |
||||
description: |
||||
name: build_resolvers |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.1.0" |
||||
build_runner: |
||||
dependency: "direct dev" |
||||
description: |
||||
name: build_runner |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.3.3" |
||||
build_runner_core: |
||||
dependency: transitive |
||||
description: |
||||
name: build_runner_core |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "7.2.7" |
||||
built_collection: |
||||
dependency: transitive |
||||
description: |
||||
name: built_collection |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "5.1.1" |
||||
built_value: |
||||
dependency: transitive |
||||
description: |
||||
name: built_value |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "8.6.1" |
||||
characters: |
||||
dependency: transitive |
||||
description: |
||||
name: characters |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.2.1" |
||||
checked_yaml: |
||||
dependency: transitive |
||||
description: |
||||
name: checked_yaml |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.0.2" |
||||
cli_util: |
||||
dependency: transitive |
||||
description: |
||||
name: cli_util |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "0.3.5" |
||||
clock: |
||||
dependency: transitive |
||||
description: |
||||
name: clock |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.1.1" |
||||
code_builder: |
||||
dependency: transitive |
||||
description: |
||||
name: code_builder |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "4.4.0" |
||||
collection: |
||||
dependency: transitive |
||||
description: |
||||
name: collection |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.16.0" |
||||
convert: |
||||
dependency: transitive |
||||
description: |
||||
name: convert |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "3.1.1" |
||||
crypto: |
||||
dependency: transitive |
||||
description: |
||||
name: crypto |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "3.0.2" |
||||
cupertino_icons: |
||||
dependency: "direct main" |
||||
description: |
||||
name: cupertino_icons |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.0.5" |
||||
dart_style: |
||||
dependency: transitive |
||||
description: |
||||
name: dart_style |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.2.5" |
||||
fake_async: |
||||
dependency: transitive |
||||
description: |
||||
name: fake_async |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.3.1" |
||||
ffi: |
||||
dependency: "direct main" |
||||
description: |
||||
name: ffi |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.0.2" |
||||
ffigen: |
||||
dependency: "direct dev" |
||||
description: |
||||
name: ffigen |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "7.2.7" |
||||
file: |
||||
dependency: transitive |
||||
description: |
||||
name: file |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "6.1.4" |
||||
fixnum: |
||||
dependency: transitive |
||||
description: |
||||
name: fixnum |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.0.1" |
||||
flutter: |
||||
dependency: "direct main" |
||||
description: flutter |
||||
source: sdk |
||||
version: "0.0.0" |
||||
flutter_lints: |
||||
dependency: "direct dev" |
||||
description: |
||||
name: flutter_lints |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.0.1" |
||||
flutter_localizations: |
||||
dependency: "direct main" |
||||
description: flutter |
||||
source: sdk |
||||
version: "0.0.0" |
||||
flutter_test: |
||||
dependency: "direct dev" |
||||
description: flutter |
||||
source: sdk |
||||
version: "0.0.0" |
||||
frontend_server_client: |
||||
dependency: transitive |
||||
description: |
||||
name: frontend_server_client |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "3.2.0" |
||||
get_it: |
||||
dependency: "direct main" |
||||
description: |
||||
name: get_it |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "7.6.0" |
||||
glob: |
||||
dependency: transitive |
||||
description: |
||||
name: glob |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.1.1" |
||||
google_fonts: |
||||
dependency: "direct main" |
||||
description: |
||||
name: google_fonts |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "4.0.4" |
||||
graphs: |
||||
dependency: transitive |
||||
description: |
||||
name: graphs |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.3.1" |
||||
http: |
||||
dependency: transitive |
||||
description: |
||||
name: http |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "0.13.5" |
||||
http_multi_server: |
||||
dependency: transitive |
||||
description: |
||||
name: http_multi_server |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "3.2.1" |
||||
http_parser: |
||||
dependency: transitive |
||||
description: |
||||
name: http_parser |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "4.0.2" |
||||
intl: |
||||
dependency: "direct main" |
||||
description: |
||||
name: intl |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "0.17.0" |
||||
io: |
||||
dependency: transitive |
||||
description: |
||||
name: io |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.0.4" |
||||
js: |
||||
dependency: transitive |
||||
description: |
||||
name: js |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "0.6.5" |
||||
json_annotation: |
||||
dependency: "direct main" |
||||
description: |
||||
name: json_annotation |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "4.8.0" |
||||
json_serializable: |
||||
dependency: "direct dev" |
||||
description: |
||||
name: json_serializable |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "6.6.1" |
||||
lints: |
||||
dependency: transitive |
||||
description: |
||||
name: lints |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.0.1" |
||||
logging: |
||||
dependency: transitive |
||||
description: |
||||
name: logging |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.1.1" |
||||
matcher: |
||||
dependency: transitive |
||||
description: |
||||
name: matcher |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "0.12.12" |
||||
material_color_utilities: |
||||
dependency: transitive |
||||
description: |
||||
name: material_color_utilities |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "0.1.5" |
||||
meta: |
||||
dependency: transitive |
||||
description: |
||||
name: meta |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.8.0" |
||||
mime: |
||||
dependency: transitive |
||||
description: |
||||
name: mime |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.0.4" |
||||
package_config: |
||||
dependency: transitive |
||||
description: |
||||
name: package_config |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.1.0" |
||||
path: |
||||
dependency: transitive |
||||
description: |
||||
name: path |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.8.2" |
||||
path_provider: |
||||
dependency: transitive |
||||
description: |
||||
name: path_provider |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.0.15" |
||||
path_provider_android: |
||||
dependency: transitive |
||||
description: |
||||
name: path_provider_android |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.0.27" |
||||
path_provider_foundation: |
||||
dependency: transitive |
||||
description: |
||||
name: path_provider_foundation |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.2.3" |
||||
path_provider_linux: |
||||
dependency: transitive |
||||
description: |
||||
name: path_provider_linux |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.1.11" |
||||
path_provider_platform_interface: |
||||
dependency: transitive |
||||
description: |
||||
name: path_provider_platform_interface |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.0.6" |
||||
path_provider_windows: |
||||
dependency: transitive |
||||
description: |
||||
name: path_provider_windows |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.1.7" |
||||
platform: |
||||
dependency: transitive |
||||
description: |
||||
name: platform |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "3.1.0" |
||||
plugin_platform_interface: |
||||
dependency: transitive |
||||
description: |
||||
name: plugin_platform_interface |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.1.4" |
||||
pool: |
||||
dependency: transitive |
||||
description: |
||||
name: pool |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.5.1" |
||||
process: |
||||
dependency: transitive |
||||
description: |
||||
name: process |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "4.2.4" |
||||
pub_semver: |
||||
dependency: transitive |
||||
description: |
||||
name: pub_semver |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.1.4" |
||||
pubspec_parse: |
||||
dependency: transitive |
||||
description: |
||||
name: pubspec_parse |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.2.3" |
||||
quiver: |
||||
dependency: transitive |
||||
description: |
||||
name: quiver |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "3.2.1" |
||||
scoped_model: |
||||
dependency: "direct main" |
||||
description: |
||||
name: scoped_model |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.0.0" |
||||
shelf: |
||||
dependency: transitive |
||||
description: |
||||
name: shelf |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.4.1" |
||||
shelf_web_socket: |
||||
dependency: transitive |
||||
description: |
||||
name: shelf_web_socket |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.0.4" |
||||
sky_engine: |
||||
dependency: transitive |
||||
description: flutter |
||||
source: sdk |
||||
version: "0.0.99" |
||||
source_gen: |
||||
dependency: transitive |
||||
description: |
||||
name: source_gen |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.3.2" |
||||
source_helper: |
||||
dependency: transitive |
||||
description: |
||||
name: source_helper |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.3.3" |
||||
source_span: |
||||
dependency: transitive |
||||
description: |
||||
name: source_span |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.9.0" |
||||
stack_trace: |
||||
dependency: transitive |
||||
description: |
||||
name: stack_trace |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.10.0" |
||||
stream_channel: |
||||
dependency: transitive |
||||
description: |
||||
name: stream_channel |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.1.0" |
||||
stream_transform: |
||||
dependency: transitive |
||||
description: |
||||
name: stream_transform |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.1.0" |
||||
string_scanner: |
||||
dependency: transitive |
||||
description: |
||||
name: string_scanner |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.1.1" |
||||
term_glyph: |
||||
dependency: transitive |
||||
description: |
||||
name: term_glyph |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.2.1" |
||||
test_api: |
||||
dependency: transitive |
||||
description: |
||||
name: test_api |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "0.4.12" |
||||
timing: |
||||
dependency: transitive |
||||
description: |
||||
name: timing |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.0.1" |
||||
typed_data: |
||||
dependency: transitive |
||||
description: |
||||
name: typed_data |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.3.2" |
||||
vector_math: |
||||
dependency: transitive |
||||
description: |
||||
name: vector_math |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.1.2" |
||||
watcher: |
||||
dependency: transitive |
||||
description: |
||||
name: watcher |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.0.2" |
||||
web_socket_channel: |
||||
dependency: transitive |
||||
description: |
||||
name: web_socket_channel |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.4.0" |
||||
win32: |
||||
dependency: transitive |
||||
description: |
||||
name: win32 |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "4.1.4" |
||||
xdg_directories: |
||||
dependency: transitive |
||||
description: |
||||
name: xdg_directories |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "1.0.0" |
||||
yaml: |
||||
dependency: transitive |
||||
description: |
||||
name: yaml |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "3.1.1" |
||||
yaml_edit: |
||||
dependency: transitive |
||||
description: |
||||
name: yaml_edit |
||||
url: "https://pub.dartlang.org" |
||||
source: hosted |
||||
version: "2.1.0" |
||||
sdks: |
||||
dart: ">=2.18.6 <3.0.0" |
||||
flutter: ">=3.3.0" |
@ -0,0 +1,45 @@
|
||||
name: flutter_example_packages |
||||
description: An application demonstrating the operation of Flutter plugins on the Aurora OS. |
||||
|
||||
publish_to: "none" |
||||
|
||||
version: 1.0.0+1 |
||||
|
||||
environment: |
||||
sdk: ">=2.18.6 <3.0.0" |
||||
|
||||
dependencies: |
||||
flutter: |
||||
sdk: flutter |
||||
flutter_localizations: |
||||
sdk: flutter |
||||
#################################### |
||||
## Platform dependent plugins Aurora OS |
||||
|
||||
#################################### |
||||
## Package verified |
||||
cupertino_icons: ^1.0.2 |
||||
google_fonts: ^4.0.3 |
||||
scoped_model: ^2.0.0 |
||||
get_it: ^7.2.0 |
||||
json_annotation: ^4.8.0 |
||||
ffi: ^2.0.2 |
||||
intl: ^0.17.0 |
||||
|
||||
dev_dependencies: |
||||
flutter_test: |
||||
sdk: |
||||
flutter |
||||
#################################### |
||||
## Package verified |
||||
flutter_lints: ^2.0.0 |
||||
build_runner: ^2.3.3 |
||||
json_serializable: ^6.6.1 |
||||
ffigen: ^7.2.7 |
||||
|
||||
flutter: |
||||
generate: true |
||||
uses-material-design: true |
||||
assets: |
||||
- assets/ |
||||
- assets/images/ |
@ -0,0 +1,94 @@
|
||||
#!/bin/bash |
||||
|
||||
# Copyright (c) 2023. Open Mobile Platform LLC. |
||||
# License: Proprietary. |
||||
|
||||
## Build example, sign rpm, upload/install/run rpm to device |
||||
|
||||
## Usage |
||||
## |
||||
## chmod +x ./run.sh |
||||
## |
||||
## ./run.sh \ |
||||
## -d <ip>:<password> \ |
||||
## -s /home/user/sign/folder |
||||
|
||||
## Flutter path |
||||
FLUTTER="$HOME/.local/opt/flutter-sdk/bin/flutter" |
||||
|
||||
## https://developer.auroraos.ru/doc/software_development/psdk/setup |
||||
## Install Platform SDK path |
||||
## You may not have set the PSDK_DIR environment variable. |
||||
## export PSDK_DIR=$HOME/AuroraPlatformSDK/sdks/aurora_psdk |
||||
|
||||
while getopts d:s: flag; do |
||||
case "${flag}" in |
||||
d) device=${OPTARG} ;; |
||||
s) sign=${OPTARG} ;; |
||||
*) |
||||
echo "usage: $0 [-d] [-s]" >&2 |
||||
exit 1 |
||||
;; |
||||
esac |
||||
done |
||||
|
||||
## Update dependency |
||||
$FLUTTER pub get |
||||
|
||||
## Generate internationalizing |
||||
$FLUTTER gen-l10n |
||||
|
||||
## Run ffigen |
||||
# $FLUTTER pub run ffigen |
||||
|
||||
## Build aurora example app |
||||
{ |
||||
$FLUTTER build aurora --release |
||||
} || { |
||||
exit 1; |
||||
} |
||||
|
||||
if [ -n "$sign" ]; then |
||||
|
||||
key=$(ls "$sign"/*key.pem) |
||||
|
||||
if [ -z "$key" ]; then |
||||
echo "Key *key.pem not found." |
||||
exit |
||||
fi |
||||
|
||||
cert=$(ls "$sign"/*cert.pem) |
||||
|
||||
if [ -z "$cert" ]; then |
||||
echo "Key *cert.pem not found." |
||||
exit |
||||
fi |
||||
|
||||
## Sign rpm system key |
||||
"$PSDK_DIR"/sdk-chroot rpmsign-external sign \ |
||||
--key "$key" \ |
||||
--cert "$cert" \ |
||||
build/aurora/arm/release/RPMS/*.rpm |
||||
fi |
||||
|
||||
if [ -n "$device" ]; then |
||||
|
||||
PACKAGE="ru.auroraos.flutter_example_packages" |
||||
|
||||
IFS=':' read -ra ADDR <<< "$device" |
||||
|
||||
D_IP="${ADDR[0]}" |
||||
D_PASS="${ADDR[1]}" |
||||
|
||||
# shellcheck disable=SC2012 |
||||
rpm=$(ls "$PWD"/build/aurora/arm/release/RPMS/*.rpm | sort -r | head -n 1) |
||||
|
||||
# upload rpm |
||||
scp "$rpm" defaultuser@"$D_IP:/home/defaultuser/Downloads" |
||||
|
||||
# install rpm |
||||
ssh -t defaultuser@"$D_IP" "echo $D_PASS | devel-su pkcon -y install-local /home/defaultuser/Downloads/$PACKAGE*.rpm" |
||||
|
||||
# run application |
||||
ssh -t defaultuser@"$D_IP" "/usr/bin/$PACKAGE" |
||||
fi |
After Width: | Height: | Size: 917 B |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 20 KiB |
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<!-- |
||||
If you are serving your web app in a path other than the root, change the |
||||
href value below to reflect the base path you are serving from. |
||||
|
||||
The path provided below has to start and end with a slash "/" in order for |
||||
it to work correctly. |
||||
|
||||
For more details: |
||||
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base |
||||
|
||||
This is a placeholder for base href that will be replaced by the value of |
||||
the `--base-href` argument provided to `flutter build`. |
||||
--> |
||||
<base href="$FLUTTER_BASE_HREF"> |
||||
|
||||
<meta charset="UTF-8"> |
||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible"> |
||||
<meta name="description" content="A new Flutter project."> |
||||
|
||||
<!-- iOS meta tags & icons --> |
||||
<meta name="apple-mobile-web-app-capable" content="yes"> |
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
||||
<meta name="apple-mobile-web-app-title" content="flutter_example_packages"> |
||||
<link rel="apple-touch-icon" href="icons/Icon-192.png"> |
||||
|
||||
<!-- Favicon --> |
||||
<link rel="icon" type="image/png" href="favicon.png"/> |
||||
|
||||
<title>flutter_example_packages</title> |
||||
<link rel="manifest" href="manifest.json"> |
||||
|
||||
<script> |
||||
// The value below is injected by flutter build, do not touch. |
||||
var serviceWorkerVersion = null; |
||||
</script> |
||||
<!-- This script adds the flutter initialization JS code --> |
||||
<script src="flutter.js" defer></script> |
||||
</head> |
||||
<body> |
||||
<script> |
||||
window.addEventListener('load', function(ev) { |
||||
// Download main.dart.js |
||||
_flutter.loader.loadEntrypoint({ |
||||
serviceWorker: { |
||||
serviceWorkerVersion: serviceWorkerVersion, |
||||
} |
||||
}).then(function(engineInitializer) { |
||||
return engineInitializer.initializeEngine(); |
||||
}).then(function(appRunner) { |
||||
return appRunner.runApp(); |
||||
}); |
||||
}); |
||||
</script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,35 @@
|
||||
{ |
||||
"name": "flutter_example_packages", |
||||
"short_name": "flutter_example_packages", |
||||
"start_url": ".", |
||||
"display": "standalone", |
||||
"background_color": "#0175C2", |
||||
"theme_color": "#0175C2", |
||||
"description": "A new Flutter project.", |
||||
"orientation": "portrait-primary", |
||||
"prefer_related_applications": false, |
||||
"icons": [ |
||||
{ |
||||
"src": "icons/Icon-192.png", |
||||
"sizes": "192x192", |
||||
"type": "image/png" |
||||
}, |
||||
{ |
||||
"src": "icons/Icon-512.png", |
||||
"sizes": "512x512", |
||||
"type": "image/png" |
||||
}, |
||||
{ |
||||
"src": "icons/Icon-maskable-192.png", |
||||
"sizes": "192x192", |
||||
"type": "image/png", |
||||
"purpose": "maskable" |
||||
}, |
||||
{ |
||||
"src": "icons/Icon-maskable-512.png", |
||||
"sizes": "512x512", |
||||
"type": "image/png", |
||||
"purpose": "maskable" |
||||
} |
||||
] |
||||
} |