Skip to content

Commit

Permalink
Improve docs, update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Feb 7, 2025
1 parent 6e2a196 commit fc10230
Show file tree
Hide file tree
Showing 95 changed files with 546 additions and 513 deletions.
36 changes: 14 additions & 22 deletions api/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ packages:
dependency: transitive
description:
name: async
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev"
source: hosted
version: "2.12.0"
version: "2.13.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -179,34 +179,26 @@ packages:
dependency: "direct main"
description:
name: dart_mappable
sha256: f69a961ae8589724ebb542e588f228ae844c5f78028899cbe2cc718977c1b382
sha256: "6eda273146ed930c1f161d0b29f4bc9ef9e87ecfb9341607833bf76b008fb7d5"
url: "https://pub.dev"
source: hosted
version: "4.3.0"
version: "4.3.1"
dart_mappable_builder:
dependency: "direct dev"
description:
name: dart_mappable_builder
sha256: "04a6e7117382f8a8689b3e363bee6c3de8c9ea4332e664148fe01bd576eb1126"
sha256: b3673a6d190f2ea766b39ea298d4c55d1caca9382a536cf164ffe7e2f955c501
url: "https://pub.dev"
source: hosted
version: "4.3.0"
version: "4.3.1+1"
dart_style:
dependency: transitive
description:
name: dart_style
sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab"
sha256: "7306ab8a2359a48d22310ad823521d723acfed60ee1f7e37388e8986853b6820"
url: "https://pub.dev"
source: hosted
version: "2.3.7"
equatable:
dependency: "direct main"
description:
name: equatable
sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7"
url: "https://pub.dev"
source: hosted
version: "2.0.7"
version: "2.3.8"
file:
dependency: transitive
description:
Expand Down Expand Up @@ -235,10 +227,10 @@ packages:
dependency: transitive
description:
name: glob
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.3"
graphs:
dependency: transitive
description:
Expand Down Expand Up @@ -280,7 +272,7 @@ packages:
source: hosted
version: "0.7.1"
json_annotation:
dependency: "direct main"
dependency: transitive
description:
name: json_annotation
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
Expand Down Expand Up @@ -320,7 +312,7 @@ packages:
source: hosted
version: "0.12.17"
meta:
dependency: "direct main"
dependency: transitive
description:
name: meta
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
Expand Down Expand Up @@ -587,10 +579,10 @@ packages:
dependency: "direct main"
description:
name: web_socket_channel
sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f"
sha256: "0b8e2457400d8a859b7b2030786835a28a8e80836ef64402abef392ff4f1d0e5"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.0.2"
webkit_inspection_protocol:
dependency: transitive
description:
Expand Down
3 changes: 0 additions & 3 deletions api/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ environment:
sdk: ">=3.3.0 <4.0.0"

dependencies:
meta: ^1.11.0
equatable: ^2.0.5
sqflite_common: ^2.5.4
json_annotation: ^4.9.0
collection: ^1.17.2
web_socket_channel: ^3.0.1
dart_mappable: ^4.3.0
Expand Down
10 changes: 5 additions & 5 deletions app/android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.1042.0)
aws-sdk-core (3.216.1)
aws-partitions (1.1047.0)
aws-sdk-core (3.218.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.97.0)
aws-sdk-kms (1.98.0)
aws-sdk-core (~> 3, >= 3.216.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.178.0)
aws-sdk-s3 (1.180.0)
aws-sdk-core (~> 3, >= 3.216.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand All @@ -33,7 +33,7 @@ GEM
commander (4.6.0)
highline (~> 2.0.0)
declarative (0.0.20)
digest-crc (0.6.5)
digest-crc (0.7.0)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20240107)
dotenv (2.8.1)
Expand Down
9 changes: 0 additions & 9 deletions app/lib/api/storage/file/file.dart

This file was deleted.

14 changes: 0 additions & 14 deletions app/lib/api/storage/file/file_html.dart

This file was deleted.

13 changes: 0 additions & 13 deletions app/lib/api/storage/file/file_io.dart

This file was deleted.

3 changes: 0 additions & 3 deletions app/lib/api/storage/file/file_stub.dart

This file was deleted.

22 changes: 12 additions & 10 deletions app/lib/pages/sources/dialog.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'dart:convert';

import 'package:file_picker/file_picker.dart';
import 'package:file_selector/file_selector.dart';
import 'package:flow/cubits/flow.dart';
import 'package:flow/pages/sources/import.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -107,15 +105,19 @@ class AddSourceDialog extends StatelessWidget {
leading: const PhosphorIcon(PhosphorIconsLight.file),
onTap: () async {
final cubit = context.read<FlowCubit>();
final result = await FilePicker.platform.pickFiles(
type: FileType.custom,
withData: true,
allowedExtensions: ['ics', 'ical', 'icalendar'],
final result = await openFile(
acceptedTypeGroups: [
XTypeGroup(
extensions: ['ics', 'ical', 'icalendar'],
label: 'iCal',
uniformTypeIdentifiers: ['public.ics'],
mimeTypes: ['text/calendar'],
)
],
);
if (result == null) return;
final data = result.files.first.bytes;
if (data == null) return;
final lines = utf8.decode(data).split('\n');
final data = await result.readAsString();
final lines = data.split('\n');
final converter = ICalConverter();
converter.read(lines);
final events = converter.data?.events ?? [];
Expand Down
13 changes: 11 additions & 2 deletions app/lib/pages/sources/local.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flow/api/storage/db/database.dart';
import 'package:flow/api/storage/file/file.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:lw_sysapi/lw_sysapi.dart';
import 'package:phosphor_flutter/phosphor_flutter.dart';

import '../../api/storage/sources.dart';
Expand All @@ -23,7 +23,16 @@ class LocalSourceDialog extends StatelessWidget {
Navigator.of(context).pop();
final db = context.read<SourcesService>().local.db;
final data = await exportDatabase(db);
saveFile('flow.db', data);
if (!context.mounted) return;
exportFile(
context: context,
fileName: 'flow',
fileExtension: 'db',
bytes: data,
mimeType: 'application/x-sqlite3',
uniformTypeIdentifier: 'public.database',
label: 'Database',
);
}),
const Divider(),
ListTile(
Expand Down
4 changes: 4 additions & 0 deletions app/linux/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "generated_plugin_registrant.h"

#include <dynamic_color/dynamic_color_plugin.h>
#include <file_selector_linux/file_selector_plugin.h>
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
#include <screen_retriever_linux/screen_retriever_linux_plugin.h>
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
Expand All @@ -17,6 +18,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
Expand Down
1 change: 1 addition & 0 deletions app/linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

list(APPEND FLUTTER_PLUGIN_LIST
dynamic_color
file_selector_linux
flutter_secure_storage_linux
screen_retriever_linux
sqlite3_flutter_libs
Expand Down
4 changes: 4 additions & 0 deletions app/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import Foundation

import connectivity_plus
import dynamic_color
import file_selector_macos
import flutter_secure_storage_darwin
import package_info_plus
import path_provider_foundation
import screen_retriever_macos
import share_plus
import shared_preferences_foundation
import sqflite_darwin
import sqlite3_flutter_libs
Expand All @@ -20,10 +22,12 @@ import window_manager
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FlutterSecureStorageDarwinPlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStorageDarwinPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ScreenRetrieverMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverMacosPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin"))
Expand Down
2 changes: 2 additions & 0 deletions app/macos/Runner/Release.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
</dict>
</plist>
Loading

0 comments on commit fc10230

Please sign in to comment.