diff --git a/.gitignore b/.gitignore index 3e48b46..ec84ad3 100644 --- a/.gitignore +++ b/.gitignore @@ -118,3 +118,9 @@ app.*.symbols !**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages !/dev/ci/**/Gemfile.lock + +# Linux flutter +linux/flutter/generated_plugin_registrant.cc +linux/flutter/generated_plugins.cmake +windows/flutter/generated_plugin_registrant.cc +windows/flutter/generated_plugins.cmake diff --git a/android/app/build.gradle b/android/app/build.gradle index d7a5345..5fdfde1 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -24,6 +24,7 @@ if (flutterVersionName == null) { android { namespace "com.example.smartfit_app_mobile" + //compileSdkVersion localProperties.getProperty('flutter.compileSdkVersion').toInteger() compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion @@ -45,8 +46,11 @@ android { applicationId "com.example.smartfit_app_mobile" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion + //minSdkVersion flutter.minSdkVersion + minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger() + //minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger() targetSdkVersion flutter.targetSdkVersion + //argetSdkVersion localProperties.getProperty('flutter.targetSdkVersion').toInteger() versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/android/build.gradle b/android/build.gradle index f7eb7f6..5264885 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.7.10' + ext.kotlin_version = '1.9.0' repositories { google() mavenCentral() diff --git a/lib/Modele/Mds/DeviceConnectionStatus.dart b/lib/Modele/Mds/DeviceConnectionStatus.dart deleted file mode 100644 index 8443751..0000000 --- a/lib/Modele/Mds/DeviceConnectionStatus.dart +++ /dev/null @@ -1,16 +0,0 @@ -/* -enum DeviceConnectionStatus { NOT_CONNECTED, CONNECTING, CONNECTED } -enum DeviceConnectionStatus { NOT_CONNECTED, CONNECTING, CONNECTED } - -extension DeviceConnectionStatusExtenstion on DeviceConnectionStatus { - String get statusName { - switch (this) { - case DeviceConnectionStatus.NOT_CONNECTED: - return "Not connected"; - case DeviceConnectionStatus.CONNECTING: - return "Connecting"; - case DeviceConnectionStatus.CONNECTED: - return "MDS connected"; - } - } -}*/ diff --git a/lib/Modele/Mds/device.dart b/lib/Modele/Mds/device.dart deleted file mode 100644 index e3eda78..0000000 --- a/lib/Modele/Mds/device.dart +++ /dev/null @@ -1,55 +0,0 @@ -/* -import 'package:smartfit_app_mobile/Modele/Mds/DeviceConnectionStatus.dart'; - -class Device { - String? _address; - String? _name; - String? _serial; - DeviceConnectionStatus _connectionStatus = - DeviceConnectionStatus.NOT_CONNECTED; - - Device(String? name, String? address) { - _name = name; - _address = address; - } - - //String? get name => _name != null ? _name : ""; - String? get name { - if (_name == null) { - return ""; - } - return _name; - } - - //String? get address => _address != null ? _address : ""; - String? get address { - if (_address == null) { - return ""; - } - return _address; - } - - //String? get serial => _serial != null ? _serial : ""; - String? get serial { - if (_serial == null) { - return ""; - } - return _serial; - } - - DeviceConnectionStatus get connectionStatus => _connectionStatus; - - void onConnecting() => _connectionStatus = DeviceConnectionStatus.CONNECTING; - void onMdsConnected(String serial) { - _serial = serial; - _connectionStatus = DeviceConnectionStatus.CONNECTED; - } - - void onDisconnected() => - _connectionStatus = DeviceConnectionStatus.NOT_CONNECTED; - - bool operator ==(o) => - o is Device && o._address == _address && o._name == _name; - int get hashCode => _address.hashCode * _name.hashCode; -} -*/ \ No newline at end of file diff --git a/lib/Modele/Mds/manager_state_watch.dart b/lib/Modele/Mds/manager_state_watch.dart deleted file mode 100644 index 39f42da..0000000 --- a/lib/Modele/Mds/manager_state_watch.dart +++ /dev/null @@ -1,101 +0,0 @@ - -/* -import 'dart:collection'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:mdsflutter/Mds.dart'; -import 'package:smartfit_app_mobile/Modele/Mds/DeviceConnectionStatus.dart'; -import 'package:smartfit_app_mobile/Modele/Mds/device.dart'; - -// Doc - https://pub.dev/packages/mdsflutter -//https://github.com/petri-lipponen-movesense/mdsflutter/tree/master/example/lib - -class ManagerStateWatch extends ChangeNotifier { - final Set _deviceList = {}; - bool _scanning = false; - // ------------------ // - - bool get scanning => _scanning; - UnmodifiableListView get deviceList => - UnmodifiableListView(_deviceList); - - // ------------------ // - - void startScan() { - // On deconnecte les devices si ils sont connecté - _deviceList.forEach((device) { - if (device.connectionStatus == DeviceConnectionStatus.CONNECTED) { - disconnect(device); - } - }); - - // On vide la liste - _deviceList.clear(); - notifyListeners(); - - // On lance le scan - try { - Mds.startScan((name, address) { - Device device = Device(name, address); - if (!_deviceList.contains(device)) { - _deviceList.add(device); - notifyListeners(); - } - }); - _scanning = true; - notifyListeners(); - } on PlatformException { - _scanning = false; - notifyListeners(); - } - } - - void stopScan() { - Mds.stopScan(); - _scanning = false; - notifyListeners(); - } - - void disconnect(Device device) { - // Deconnexion matérielle - Mds.disconnect(device.address!); - - disconnectOnModele(device.address); - } - - void disconnectOnModele(String? address) { - // Deconnexion avec l'enum - Device foundDevice = - _deviceList.firstWhere((element) => element.address == address); - foundDevice.onDisconnected(); - notifyListeners(); - } - - void connectToDevice(Device device) { - // Changement de l'enum (On connecting) - device.onConnecting(); - // Connexion matérielle - Mds.connect( - device.address!, - // Connexion établi - (serial) => _onDeviceMdsConnected(device.address, serial), - // Connexion coupé - () => disconnectOnModele(device.address), - // Erreur dans la connexion - () => _onDeviceConnectError(device.address)); - } - - // Appeller si la connexion à réussi - void _onDeviceMdsConnected(String? address, String serial) { - Device foundDevice = - _deviceList.firstWhere((element) => element.address == address); - // On save le serial + changer l'enum en connected - foundDevice.onMdsConnected(serial); - notifyListeners(); - } - - // Appeller si une erreur survient dans la connexion - void _onDeviceConnectError(String? address) { - disconnectOnModele(address); - } -}*/ diff --git a/lib/Modele/manager_file.dart b/lib/Modele/manager_file.dart index babd950..fa13c6e 100644 --- a/lib/Modele/manager_file.dart +++ b/lib/Modele/manager_file.dart @@ -1,5 +1,4 @@ import 'dart:convert'; -import 'dart:ffi'; import 'dart:io'; import 'package:csv/csv.dart'; import 'package:fit_tool/fit_tool.dart'; @@ -78,13 +77,15 @@ class ManagerFile { firtTimeStamp = ligne[4]; } //result.add([(ligne[4] - firtTimeStamp) ~/ 100, ligne[10]]); - result.add(FlSpot((ligne[4] - firtTimeStamp) ~/ 100, ligne[10])); - } else if (ligne.length >= 16 && ligne[16] == "heart_rate") { + result.add( + FlSpot((ligne[4] - firtTimeStamp) / 100, ligne[10].toDouble())); + } else if (ligne.length >= 16 && ligne[15] == "heart_rate") { if (firtTimeStamp == 0) { firtTimeStamp = ligne[4]; } //result.add([(ligne[4] - firtTimeStamp) ~/ 100, ligne[17]]); - result.add(FlSpot((ligne[4] - firtTimeStamp) ~/ 100, ligne[17])); + result.add( + FlSpot((ligne[4] - firtTimeStamp) / 100, ligne[16].toDouble())); } } } diff --git a/lib/View/activity/activity.dart b/lib/View/activity/activity.dart index 8f46e03..db26c3f 100644 --- a/lib/View/activity/activity.dart +++ b/lib/View/activity/activity.dart @@ -1,5 +1,4 @@ import 'package:smartfit_app_mobile/common_widget/steps.dart'; -import 'package:smartfit_app_mobile/common_widget/dates.dart'; import 'package:smartfit_app_mobile/common_widget/graph.dart'; import 'package:smartfit_app_mobile/common_widget/info.dart' hide Stats; import 'package:smartfit_app_mobile/common_widget/stats.dart'; @@ -25,4 +24,4 @@ class Activity extends StatelessWidget { ), ); } -} \ No newline at end of file +} diff --git a/lib/View/home/activity_tracker.dart b/lib/View/home/activity_tracker.dart index d87d351..ad5abdd 100644 --- a/lib/View/home/activity_tracker.dart +++ b/lib/View/home/activity_tracker.dart @@ -2,7 +2,6 @@ import 'package:fl_chart/fl_chart.dart'; import 'package:flutter/material.dart'; import '../../common/colo_extension.dart'; -import '../../common_widget/latest_activity_row.dart'; import '../../common_widget/today_target_cell.dart'; class ActivityTrackerView extends StatefulWidget { @@ -13,7 +12,7 @@ class ActivityTrackerView extends StatefulWidget { } class _ActivityTrackerViewState extends State { - int touchedIndex = -1; + int touchedIndex = -1; List latestArr = [ { @@ -209,23 +208,20 @@ class _ActivityTrackerViewState extends State { )), ], ), - SizedBox( height: media.width * 0.05, ), - Container( height: media.width * 0.5, - padding: const EdgeInsets.symmetric(vertical: 15 , horizontal: 0), + padding: + const EdgeInsets.symmetric(vertical: 15, horizontal: 0), decoration: BoxDecoration( color: TColor.white, borderRadius: BorderRadius.circular(15), boxShadow: const [ BoxShadow(color: Colors.black12, blurRadius: 3) ]), - child: BarChart( - - BarChartData( + child: BarChart(BarChartData( barTouchData: BarTouchData( touchTooltipData: BarTouchTooltipData( tooltipBgColor: Colors.grey, @@ -293,10 +289,10 @@ class _ActivityTrackerViewState extends State { ), titlesData: FlTitlesData( show: true, - rightTitles: AxisTitles( + rightTitles: AxisTitles( sideTitles: SideTitles(showTitles: false), ), - topTitles: AxisTitles( + topTitles: AxisTitles( sideTitles: SideTitles(showTitles: false), ), bottomTitles: AxisTitles( @@ -306,7 +302,7 @@ class _ActivityTrackerViewState extends State { reservedSize: 38, ), ), - leftTitles: AxisTitles( + leftTitles: AxisTitles( sideTitles: SideTitles( showTitles: false, ), @@ -316,16 +312,12 @@ class _ActivityTrackerViewState extends State { show: false, ), barGroups: showingGroups(), - gridData: FlGridData(show: false), - ) - - ), + gridData: FlGridData(show: false), + )), ), - SizedBox( height: media.width * 0.05, ), - SizedBox( height: media.width * 0.1, ), @@ -345,28 +337,28 @@ class _ActivityTrackerViewState extends State { Widget text; switch (value.toInt()) { case 0: - text = Text('Dim', style: style); + text = Text('Dim', style: style); break; case 1: - text = Text('Lun', style: style); + text = Text('Lun', style: style); break; case 2: - text = Text('Mar', style: style); + text = Text('Mar', style: style); break; case 3: - text = Text('Mer', style: style); + text = Text('Mer', style: style); break; case 4: - text = Text('Jeu', style: style); + text = Text('Jeu', style: style); break; case 5: - text = Text('Ven', style: style); + text = Text('Ven', style: style); break; case 6: - text = Text('Sam', style: style); + text = Text('Sam', style: style); break; default: - text = Text('', style: style); + text = Text('', style: style); break; } return SideTitleWidget( @@ -375,44 +367,52 @@ class _ActivityTrackerViewState extends State { child: text, ); } - List showingGroups() => List.generate(7, (i) { + + List showingGroups() => List.generate(7, (i) { switch (i) { case 0: - return makeGroupData(0, 5, TColor.primaryG , isTouched: i == touchedIndex); + return makeGroupData(0, 5, TColor.primaryG, + isTouched: i == touchedIndex); case 1: - return makeGroupData(1, 10.5, TColor.secondaryG, isTouched: i == touchedIndex); + return makeGroupData(1, 10.5, TColor.secondaryG, + isTouched: i == touchedIndex); case 2: - return makeGroupData(2, 5, TColor.primaryG , isTouched: i == touchedIndex); + return makeGroupData(2, 5, TColor.primaryG, + isTouched: i == touchedIndex); case 3: - return makeGroupData(3, 7.5, TColor.secondaryG, isTouched: i == touchedIndex); + return makeGroupData(3, 7.5, TColor.secondaryG, + isTouched: i == touchedIndex); case 4: - return makeGroupData(4, 15, TColor.primaryG , isTouched: i == touchedIndex); + return makeGroupData(4, 15, TColor.primaryG, + isTouched: i == touchedIndex); case 5: - return makeGroupData(5, 5.5, TColor.secondaryG, isTouched: i == touchedIndex); + return makeGroupData(5, 5.5, TColor.secondaryG, + isTouched: i == touchedIndex); case 6: - return makeGroupData(6, 8.5, TColor.primaryG , isTouched: i == touchedIndex); + return makeGroupData(6, 8.5, TColor.primaryG, + isTouched: i == touchedIndex); default: return throw Error(); } }); - BarChartGroupData makeGroupData( + BarChartGroupData makeGroupData( int x, double y, - List barColor, - { + List barColor, { bool isTouched = false, - double width = 22, List showTooltips = const [], }) { - return BarChartGroupData( x: x, barRods: [ BarChartRodData( toY: isTouched ? y + 1 : y, - gradient: LinearGradient(colors: barColor, begin: Alignment.topCenter, end: Alignment.bottomCenter ), + gradient: LinearGradient( + colors: barColor, + begin: Alignment.topCenter, + end: Alignment.bottomCenter), width: width, borderSide: isTouched ? const BorderSide(color: Colors.green) @@ -427,5 +427,4 @@ class _ActivityTrackerViewState extends State { showingTooltipIndicators: showTooltips, ); } - -} \ No newline at end of file +} diff --git a/lib/View/home/home_view.dart b/lib/View/home/home_view.dart index 297ff41..a141e1a 100644 --- a/lib/View/home/home_view.dart +++ b/lib/View/home/home_view.dart @@ -8,7 +8,6 @@ import 'package:flutter/material.dart'; import 'package:simple_animation_progress_bar/simple_animation_progress_bar.dart'; import 'package:simple_circular_progress_bar/simple_circular_progress_bar.dart'; import 'package:smartfit_app_mobile/view/home/activity_tracker.dart'; -import 'package:smartfit_app_mobile/view/home/blank_view.dart'; import 'package:smartfit_app_mobile/view/home/notification_view.dart'; import '../../common/colo_extension.dart'; //import 'activity_tracker_view.dart'; @@ -81,7 +80,7 @@ class _HomeViewState extends State { ), dotData: FlDotData(show: false), gradient: LinearGradient( - colors: TColor.secondaryG , + colors: TColor.secondaryG, ), ), ]; @@ -303,7 +302,8 @@ class _HomeViewState extends State { child: Text( "78 BPM", style: TextStyle( - color: TColor.primaryColor1.withOpacity(0.7), + color: + TColor.primaryColor1.withOpacity(0.7), fontWeight: FontWeight.w700, fontSize: 18), ), @@ -878,7 +878,6 @@ class _HomeViewState extends State { SizedBox( height: media.width * 0.05, ), - SizedBox( height: media.width * 0.1, ), @@ -892,7 +891,6 @@ class _HomeViewState extends State { - List showingSections() { return List.generate( 2, @@ -1041,28 +1039,28 @@ class _HomeViewState extends State { Widget text; switch (value.toInt()) { case 1: - text = Text('Dim', style: style); + text = Text('Dim', style: style); break; case 2: - text = Text('Lun', style: style); + text = Text('Lun', style: style); break; case 3: - text = Text('Mar', style: style); + text = Text('Mar', style: style); break; case 4: - text = Text('Mer', style: style); + text = Text('Mer', style: style); break; case 5: - text = Text('Jeu', style: style); + text = Text('Jeu', style: style); break; case 6: - text = Text('Ven', style: style); + text = Text('Ven', style: style); break; case 7: - text = Text('Sam', style: style); + text = Text('Sam', style: style); break; default: - text = Text('', style: style); + text = Text('', style: style); break; } @@ -1072,4 +1070,4 @@ class _HomeViewState extends State { child: text, ); } -} \ No newline at end of file +} diff --git a/lib/View/login/signup_view.dart b/lib/View/login/signup_view.dart index 0efce72..8df0c9c 100644 --- a/lib/View/login/signup_view.dart +++ b/lib/View/login/signup_view.dart @@ -2,9 +2,7 @@ import 'package:flutter_svg/svg.dart'; import 'package:smartfit_app_mobile/common/colo_extension.dart'; import 'package:smartfit_app_mobile/common_widget/round_button.dart'; import 'package:smartfit_app_mobile/common_widget/round_text_field.dart'; -import 'package:smartfit_app_mobile/view/home/home_view.dart'; //import 'package:smartfit_app_mobile/view/login/complete_profile_view.dart'; -import 'package:smartfit_app_mobile/view/login/login_view.dart'; import 'package:flutter/material.dart'; import 'package:smartfit_app_mobile/view/main_tab/main_tab_view.dart'; @@ -101,11 +99,10 @@ class _SignUpViewState extends State { ), Padding( padding: const EdgeInsets.only(top: 8), - child: Text( - "En continuant, vous acceptez notre Politique de\nconfidentialité et nos Conditions d'utilisation.", - style: TextStyle(color: TColor.gray, fontSize: 10), - ), - + child: Text( + "En continuant, vous acceptez notre Politique de\nconfidentialité et nos Conditions d'utilisation.", + style: TextStyle(color: TColor.gray, fontSize: 10), + ), ) ], ), @@ -162,11 +159,9 @@ class _SignUpViewState extends State { ), ), ), - - SizedBox( + SizedBox( width: media.width * 0.04, ), - GestureDetector( onTap: () {}, child: Container( @@ -195,10 +190,10 @@ class _SignUpViewState extends State { ), TextButton( onPressed: () { - Navigator.push( - context, + Navigator.push( + context, MaterialPageRoute( - builder: (context) => const MainTabView())); + builder: (context) => const MainTabView())); }, child: Row( mainAxisSize: MainAxisSize.min, @@ -230,4 +225,4 @@ class _SignUpViewState extends State { ), ); } -} \ No newline at end of file +} diff --git a/lib/View/main_tab/main_tab_view.dart b/lib/View/main_tab/main_tab_view.dart index 41c2386..85e45f1 100644 --- a/lib/View/main_tab/main_tab_view.dart +++ b/lib/View/main_tab/main_tab_view.dart @@ -1,16 +1,12 @@ import 'package:smartfit_app_mobile/common/colo_extension.dart'; import 'package:smartfit_app_mobile/common_widget/tab_button.dart'; import 'package:smartfit_app_mobile/view/activity/activity.dart'; -import 'package:smartfit_app_mobile/view/home/blank_view.dart'; import 'package:smartfit_app_mobile/view/home/home_view.dart'; -import 'package:smartfit_app_mobile/view/main_tab/select_view.dart'; import 'package:flutter/material.dart'; import 'package:smartfit_app_mobile/view/map/my_map.dart'; import 'package:smartfit_app_mobile/view/page_test.dart'; import 'package:smartfit_app_mobile/view/profile/profile_view.dart'; - - class MainTabView extends StatefulWidget { const MainTabView({super.key}); @@ -20,7 +16,7 @@ class MainTabView extends StatefulWidget { class _MainTabViewState extends State { int selectTab = 0; - final PageStorageBucket pageBucket = PageStorageBucket(); + final PageStorageBucket pageBucket = PageStorageBucket(); Widget currentTab = const HomeView(); @override Widget build(BuildContext context) { @@ -34,10 +30,10 @@ class _MainTabViewState extends State { child: InkWell( onTap: () { selectTab = 0; - currentTab = const TestPage(); - if (mounted) { - setState(() {}); - } + currentTab = const TestPage(); + if (mounted) { + setState(() {}); + } }, child: Container( width: 65, @@ -49,10 +45,15 @@ class _MainTabViewState extends State { borderRadius: BorderRadius.circular(35), boxShadow: const [ BoxShadow( - color: Colors.black12, - blurRadius: 2,) + color: Colors.black12, + blurRadius: 2, + ) ]), - child: Icon(Icons.search,color: TColor.white, size: 35, ), + child: Icon( + Icons.search, + color: TColor.white, + size: 35, + ), ), ), ), @@ -87,15 +88,16 @@ class _MainTabViewState extends State { setState(() {}); } }), - - const SizedBox(width: 40,), + const SizedBox( + width: 40, + ), TabButton( icon: "assets/img/Camera_tab.svg", selectIcon: "assets/img/Camera_tab_select.svg", isActive: selectTab == 2, onTap: () { selectTab = 2; - currentTab = const MyMap(); + currentTab = const MyMap(); if (mounted) { setState(() {}); } @@ -106,16 +108,14 @@ class _MainTabViewState extends State { isActive: selectTab == 3, onTap: () { selectTab = 3; - currentTab = const ProfileView(); + currentTab = const ProfileView(); if (mounted) { setState(() {}); } }) - - ], ), )), ); } -} \ No newline at end of file +} diff --git a/lib/View/page_test.dart b/lib/View/page_test.dart index 30aabbc..10dcee2 100644 --- a/lib/View/page_test.dart +++ b/lib/View/page_test.dart @@ -67,7 +67,8 @@ class _TestPage extends State { print("t"); } else { List result = await x.readFitFile(y!); - //print(x.getHeartRateWithTime(ActivityOfUser(result))); + print(result); + print(x.getHeartRateWithTime(ActivityOfUser(result))); //print(x.getDistanceWithTime(ActivityOfUser(result))); //print(x.getDistance(ActivityOfUser(result))); print(x.getAltitudeWithTime(ActivityOfUser(result))); diff --git a/lib/main.dart b/lib/main.dart index 8e731f2..408ec98 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:smartfit_app_mobile/Modele/user.dart'; import 'package:smartfit_app_mobile/View/on_boarding/started_view.dart'; -import 'package:smartfit_app_mobile/View/page_test.dart'; import 'package:smartfit_app_mobile/common/colo_extension.dart'; void main() { @@ -20,24 +19,23 @@ class MyApp extends StatelessWidget { title: 'SmartFit 3 in 1', debugShowCheckedModeBanner: false, theme: ThemeData( - // This is the theme of your application. - // - // TRY THIS: Try running your application with "flutter run". You'll see - // the application has a blue toolbar. Then, without quitting the app, - // try changing the seedColor in the colorScheme below to Colors.green - // and then invoke "hot reload" (save your changes or press the "hot - // reload" button in a Flutter-supported IDE, or press "r" if you used - // the command line to start the app). - // - // Notice that the counter didn't reset back to zero; the application - // state is not lost during the reload. To reset the state, use hot - // restart instead. - // - // This works for code too, not just values: Most code changes can be - // tested with just a hot reload. - primaryColor: TColor.primaryColor1, - fontFamily: "Poppins" - ), + // This is the theme of your application. + // + // TRY THIS: Try running your application with "flutter run". You'll see + // the application has a blue toolbar. Then, without quitting the app, + // try changing the seedColor in the colorScheme below to Colors.green + // and then invoke "hot reload" (save your changes or press the "hot + // reload" button in a Flutter-supported IDE, or press "r" if you used + // the command line to start the app). + // + // Notice that the counter didn't reset back to zero; the application + // state is not lost during the reload. To reset the state, use hot + // restart instead. + // + // This works for code too, not just values: Most code changes can be + // tested with just a hot reload. + primaryColor: TColor.primaryColor1, + fontFamily: "Poppins"), home: const StartedView(), ); } diff --git a/linux/flutter/CMakeLists.txt b/linux/flutter/CMakeLists.txt deleted file mode 100644 index d5bd016..0000000 --- a/linux/flutter/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.10) - -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") - -# Configuration provided via flutter tool. -include(${EPHEMERAL_DIR}/generated_config.cmake) - -# TODO: Move the rest of this into files in ephemeral. See -# https://github.com/flutter/flutter/issues/57146. - -# Serves the same purpose as list(TRANSFORM ... PREPEND ...), -# which isn't available in 3.10. -function(list_prepend LIST_NAME PREFIX) - set(NEW_LIST "") - foreach(element ${${LIST_NAME}}) - list(APPEND NEW_LIST "${PREFIX}${element}") - endforeach(element) - set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) -endfunction() - -# === Flutter Library === -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) -pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) -pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) - -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") - -# Published to parent scope for install step. -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) -set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "fl_basic_message_channel.h" - "fl_binary_codec.h" - "fl_binary_messenger.h" - "fl_dart_project.h" - "fl_engine.h" - "fl_json_message_codec.h" - "fl_json_method_codec.h" - "fl_message_codec.h" - "fl_method_call.h" - "fl_method_channel.h" - "fl_method_codec.h" - "fl_method_response.h" - "fl_plugin_registrar.h" - "fl_plugin_registry.h" - "fl_standard_message_codec.h" - "fl_standard_method_codec.h" - "fl_string_codec.h" - "fl_value.h" - "fl_view.h" - "flutter_linux.h" -) -list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") -target_link_libraries(flutter INTERFACE - PkgConfig::GTK - PkgConfig::GLIB - PkgConfig::GIO -) -add_dependencies(flutter flutter_assemble) - -# === Flutter tool backend === -# _phony_ is a non-existent file to force this command to run every time, -# since currently there's no way to get a full input/output list from the -# flutter tool. -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CMAKE_CURRENT_BINARY_DIR}/_phony_ - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" - ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} -) diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 8fe711c..0000000 --- a/linux/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include - -void fl_register_plugins(FlPluginRegistry* registry) { - g_autoptr(FlPluginRegistrar) simple_animation_progress_bar_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "SimpleAnimationProgressBarPlugin"); - simple_animation_progress_bar_plugin_register_with_registrar(simple_animation_progress_bar_registrar); -} diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake deleted file mode 100644 index d00be37..0000000 --- a/linux/flutter/generated_plugins.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - simple_animation_progress_bar -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index dddde2c..0000000 --- a/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,14 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include - -void RegisterPlugins(flutter::PluginRegistry* registry) { - SimpleAnimationProgressBarPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("SimpleAnimationProgressBarPluginCApi")); -} diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake deleted file mode 100644 index 36dd032..0000000 --- a/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - simple_animation_progress_bar -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin)