From 5476397af67a2257258ad7fc60a75aace62c1814 Mon Sep 17 00:00:00 2001 From: Kima Date: Sat, 30 Dec 2023 18:10:19 +0100 Subject: [PATCH] finished notes page --- .../lib/api/providers/self_note_provider.dart | 53 +++++ filcnaplo/lib/app.dart | 10 +- filcnaplo/lib/database/store.dart | 4 +- filcnaplo/lib/models/self_note.dart | 6 + .../lib/common/panel/panel.dart | 17 +- .../lib/screens/notes/add_note_screen.dart | 186 ++++++++++++++++++ .../lib/screens/notes/note_view_screen.dart | 153 ++++++++++++++ .../lib/screens/notes/notes_screen.dart | 59 +++++- .../lib/screens/notes/notes_screen.i18n.dart | 15 ++ .../lib/screens/notes/self_note_tile.dart | 64 ++++++ .../lib/screens/settings/settings_screen.dart | 9 +- filcnaplo_mobile_ui/pubspec.yaml | 1 + 12 files changed, 561 insertions(+), 16 deletions(-) create mode 100644 filcnaplo/lib/api/providers/self_note_provider.dart create mode 100644 filcnaplo_mobile_ui/lib/screens/notes/add_note_screen.dart create mode 100644 filcnaplo_mobile_ui/lib/screens/notes/note_view_screen.dart create mode 100644 filcnaplo_mobile_ui/lib/screens/notes/self_note_tile.dart diff --git a/filcnaplo/lib/api/providers/self_note_provider.dart b/filcnaplo/lib/api/providers/self_note_provider.dart new file mode 100644 index 0000000..9756f2c --- /dev/null +++ b/filcnaplo/lib/api/providers/self_note_provider.dart @@ -0,0 +1,53 @@ +import 'package:filcnaplo/api/providers/user_provider.dart'; +import 'package:filcnaplo/api/providers/database_provider.dart'; +import 'package:filcnaplo/models/self_note.dart'; +import 'package:filcnaplo/models/user.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class SelfNoteProvider with ChangeNotifier { + late List _notes; + late BuildContext _context; + List get notes => _notes; + + SelfNoteProvider({ + List initialNotes = const [], + required BuildContext context, + }) { + _notes = List.castFrom(initialNotes); + _context = context; + + if (_notes.isEmpty) restore(); + } + + // restore self notes from db + Future restore() async { + String? userId = Provider.of(_context, listen: false).id; + + // load self notes from db + if (userId != null) { + var dbNotes = await Provider.of(_context, listen: false) + .userQuery + .getSelfNotes(userId: userId); + _notes = dbNotes; + notifyListeners(); + } + } + + // fetches fresh data from api (not needed, cuz no api for that) + // Future fetch() async { + // } + + // store self notes in db + Future store(List notes) async { + User? user = Provider.of(_context, listen: false).user; + if (user == null) throw "Cannot store Self Notes for User null"; + String userId = user.id; + + await Provider.of(_context, listen: false) + .userStore + .storeSelfNotes(notes, userId: userId); + _notes = notes; + notifyListeners(); + } +} diff --git a/filcnaplo/lib/app.dart b/filcnaplo/lib/app.dart index 313f523..de4bcdc 100644 --- a/filcnaplo/lib/app.dart +++ b/filcnaplo/lib/app.dart @@ -9,6 +9,7 @@ import 'package:filcnaplo/api/providers/ad_provider.dart'; import 'package:filcnaplo/api/providers/live_card_provider.dart'; import 'package:filcnaplo/api/providers/news_provider.dart'; import 'package:filcnaplo/api/providers/database_provider.dart'; +import 'package:filcnaplo/api/providers/self_note_provider.dart'; import 'package:filcnaplo/api/providers/status_provider.dart'; import 'package:filcnaplo/models/config.dart'; import 'package:filcnaplo/theme/observer.dart'; @@ -158,22 +159,25 @@ class App extends StatelessWidget { ), ), ChangeNotifierProvider( - create: (context) => LiveCardProvider( + create: (_) => LiveCardProvider( timetable: timetable, settings: settings, ), ), ChangeNotifierProvider( - create: (context) => GoalProvider( + create: (_) => GoalProvider( database: database, user: user, ), ), ChangeNotifierProvider( - create: (context) => ShareProvider( + create: (_) => ShareProvider( user: user, ), ), + ChangeNotifierProvider( + create: (context) => SelfNoteProvider(context: context), + ), ], child: Consumer( builder: (context, themeMode, child) { diff --git a/filcnaplo/lib/database/store.dart b/filcnaplo/lib/database/store.dart index 7d23579..5075d16 100644 --- a/filcnaplo/lib/database/store.dart +++ b/filcnaplo/lib/database/store.dart @@ -187,9 +187,9 @@ class UserDatabaseStore { where: "id = ?", whereArgs: [userId]); } - Future storeSelfNotes(List absences, + Future storeSelfNotes(List selfNotes, {required String userId}) async { - String selfNotesJson = jsonEncode(absences.map((e) => e.json).toList()); + String selfNotesJson = jsonEncode(selfNotes.map((e) => e.json).toList()); await db.update("user_data", {"self_notes": selfNotesJson}, where: "id = ?", whereArgs: [userId]); } diff --git a/filcnaplo/lib/models/self_note.dart b/filcnaplo/lib/models/self_note.dart index 58944d8..609f6ff 100644 --- a/filcnaplo/lib/models/self_note.dart +++ b/filcnaplo/lib/models/self_note.dart @@ -19,4 +19,10 @@ class SelfNote { json: json, ); } + + get toJson => { + 'id': id, + 'title': title, + 'content': content, + }; } diff --git a/filcnaplo_mobile_ui/lib/common/panel/panel.dart b/filcnaplo_mobile_ui/lib/common/panel/panel.dart index 8f612d7..b745cc0 100755 --- a/filcnaplo_mobile_ui/lib/common/panel/panel.dart +++ b/filcnaplo_mobile_ui/lib/common/panel/panel.dart @@ -4,13 +4,20 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class Panel extends StatelessWidget { - const Panel( - {super.key, this.child, this.title, this.padding, this.hasShadow = true}); + const Panel({ + super.key, + this.child, + this.title, + this.padding, + this.hasShadow = true, + this.isTransparent = false, + }); final Widget? child; final Widget? title; final EdgeInsetsGeometry? padding; final bool hasShadow; + final bool isTransparent; @override Widget build(BuildContext context) { @@ -26,9 +33,11 @@ class Panel extends StatelessWidget { width: double.infinity, decoration: BoxDecoration( borderRadius: BorderRadius.circular(16.0), - color: Theme.of(context).colorScheme.background, + color: isTransparent + ? Colors.transparent + : Theme.of(context).colorScheme.background, boxShadow: [ - if (hasShadow && + if ((hasShadow && !isTransparent) && Provider.of(context, listen: false) .shadowEffect) BoxShadow( diff --git a/filcnaplo_mobile_ui/lib/screens/notes/add_note_screen.dart b/filcnaplo_mobile_ui/lib/screens/notes/add_note_screen.dart new file mode 100644 index 0000000..2ef6418 --- /dev/null +++ b/filcnaplo_mobile_ui/lib/screens/notes/add_note_screen.dart @@ -0,0 +1,186 @@ +// ignore_for_file: use_build_context_synchronously + +import 'package:filcnaplo/api/providers/database_provider.dart'; +import 'package:filcnaplo/api/providers/self_note_provider.dart'; +import 'package:filcnaplo/api/providers/user_provider.dart'; +import 'package:filcnaplo/models/self_note.dart'; +import 'package:filcnaplo/theme/colors/colors.dart'; +import 'package:filcnaplo_kreta_api/providers/homework_provider.dart'; +import 'package:filcnaplo_mobile_ui/screens/notes/notes_screen.i18n.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_feather_icons/flutter_feather_icons.dart'; +import 'package:provider/provider.dart'; +import 'package:uuid/uuid.dart'; + +class AddNoteScreen extends StatefulWidget { + const AddNoteScreen({super.key, this.initialNote}); + + final SelfNote? initialNote; + + @override + AddNoteScreenState createState() => AddNoteScreenState(); +} + +class AddNoteScreenState extends State { + late UserProvider user; + late HomeworkProvider homeworkProvider; + late DatabaseProvider databaseProvider; + late SelfNoteProvider selfNoteProvider; + + final _contentController = TextEditingController(); + final _titleController = TextEditingController(); + + @override + void initState() { + _contentController.text = widget.initialNote?.content ?? ''; + _titleController.text = widget.initialNote?.title ?? ''; + + super.initState(); + } + + @override + Widget build(BuildContext context) { + user = Provider.of(context); + homeworkProvider = Provider.of(context); + databaseProvider = Provider.of(context); + selfNoteProvider = Provider.of(context); + + return Scaffold( + appBar: AppBar( + surfaceTintColor: Theme.of(context).scaffoldBackgroundColor, + leading: BackButton(color: AppColors.of(context).text), + title: Text( + widget.initialNote == null ? 'new_note'.i18n : 'edit_note'.i18n, + style: TextStyle( + color: AppColors.of(context).text, + fontSize: 26.0, + fontWeight: FontWeight.bold, + ), + ), + actions: [ + ClipRRect( + borderRadius: BorderRadius.circular(10.1), + child: GestureDetector( + onTap: () async { + // handle tap + if (_contentController.text.replaceAll(' ', '') == '') { + return; + } + + var notes = selfNoteProvider.notes; + + if (widget.initialNote == null) { + notes.add(SelfNote.fromJson({ + 'id': const Uuid().v4(), + 'title': _titleController.text.replaceAll(' ', '') == '' + ? null + : _titleController.text, + 'content': _contentController.text + })); + } else { + var i = + notes.indexWhere((e) => e.id == widget.initialNote!.id); + + notes[i] = SelfNote.fromJson({ + 'id': notes[i].id, + 'title': _titleController.text.replaceAll(' ', '') == '' + ? null + : _titleController.text, + 'content': _contentController.text, + }); + } + + await selfNoteProvider.store(notes); + + Navigator.of(context).pop(); + if (widget.initialNote != null) { + Navigator.of(context).pop(); + } + }, + child: Container( + color: Theme.of(context).colorScheme.primary.withOpacity(0.4), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Stack( + children: [ + IconTheme( + data: IconThemeData( + color: Theme.of(context).colorScheme.secondary, + ), + child: const Icon( + FeatherIcons.check, + size: 20.0, + ), + ), + IconTheme( + data: IconThemeData( + color: + Theme.of(context).brightness == Brightness.light + ? Colors.black.withOpacity(.5) + : Colors.white.withOpacity(.3), + ), + child: const Icon( + FeatherIcons.check, + size: 20.0, + ), + ), + ], + ), + ), + ), + ), + ), + const SizedBox( + width: 20, + ), + ], + ), + body: SafeArea( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 22.0), + child: Column( + children: [ + TextField( + controller: _titleController, + expands: false, + maxLines: 1, + decoration: InputDecoration( + border: InputBorder.none, + enabledBorder: InputBorder.none, + focusedBorder: InputBorder.none, + hintText: "hint_t".i18n, + hintStyle: const TextStyle( + fontSize: 22.0, + fontWeight: FontWeight.w600, + ), + ), + textAlign: TextAlign.start, + style: const TextStyle( + fontSize: 22.0, + fontWeight: FontWeight.w600, + ), + ), + Expanded( + child: TextField( + controller: _contentController, + expands: true, + minLines: null, + maxLines: null, + decoration: InputDecoration( + border: InputBorder.none, + enabledBorder: InputBorder.none, + focusedBorder: InputBorder.none, + hintText: "hint".i18n, + hintStyle: const TextStyle(fontSize: 16.0), + ), + textAlign: TextAlign.start, + style: const TextStyle(fontSize: 16.0), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/filcnaplo_mobile_ui/lib/screens/notes/note_view_screen.dart b/filcnaplo_mobile_ui/lib/screens/notes/note_view_screen.dart new file mode 100644 index 0000000..6420065 --- /dev/null +++ b/filcnaplo_mobile_ui/lib/screens/notes/note_view_screen.dart @@ -0,0 +1,153 @@ +import 'package:filcnaplo/api/providers/self_note_provider.dart'; +import 'package:filcnaplo/models/self_note.dart'; +import 'package:filcnaplo/theme/colors/colors.dart'; +import 'package:filcnaplo_mobile_ui/screens/notes/add_note_screen.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_feather_icons/flutter_feather_icons.dart'; +import 'package:provider/provider.dart'; + +class NoteViewScreen extends StatefulWidget { + const NoteViewScreen({super.key, required this.note}); + + final SelfNote note; + + @override + NoteViewScreenState createState() => NoteViewScreenState(); +} + +class NoteViewScreenState extends State { + late SelfNoteProvider selfNoteProvider; + + @override + Widget build(BuildContext context) { + selfNoteProvider = Provider.of(context); + + return Scaffold( + appBar: AppBar( + surfaceTintColor: Theme.of(context).scaffoldBackgroundColor, + leading: BackButton(color: AppColors.of(context).text), + title: Text( + widget.note.title ?? '${widget.note.content.split(' ')[0]}...', + style: TextStyle( + color: AppColors.of(context).text, + fontSize: 26.0, + fontWeight: FontWeight.bold, + ), + ), + actions: [ + ClipRRect( + borderRadius: BorderRadius.circular(10.1), + child: GestureDetector( + onTap: () { + // handle tap + Navigator.of(context, rootNavigator: true).push( + CupertinoPageRoute( + builder: (context) => + AddNoteScreen(initialNote: widget.note))); + }, + child: Container( + color: Theme.of(context).colorScheme.primary.withOpacity(0.4), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Stack( + children: [ + IconTheme( + data: IconThemeData( + color: Theme.of(context).colorScheme.secondary, + ), + child: const Icon( + FeatherIcons.edit, + size: 20.0, + ), + ), + IconTheme( + data: IconThemeData( + color: + Theme.of(context).brightness == Brightness.light + ? Colors.black.withOpacity(.5) + : Colors.white.withOpacity(.3), + ), + child: const Icon( + FeatherIcons.edit, + size: 20.0, + ), + ), + ], + ), + ), + ), + ), + ), + const SizedBox( + width: 10, + ), + ClipRRect( + borderRadius: BorderRadius.circular(10.1), + child: GestureDetector( + onTap: () async { + // handle tap + var notes = selfNoteProvider.notes; + notes.removeWhere((e) => e.id == widget.note.id); + await selfNoteProvider.store(notes); + + // ignore: use_build_context_synchronously + Navigator.of(context).pop(); + }, + child: Container( + color: Theme.of(context).colorScheme.primary.withOpacity(0.4), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Stack( + children: [ + IconTheme( + data: IconThemeData( + color: Theme.of(context).colorScheme.secondary, + ), + child: const Icon( + FeatherIcons.trash2, + size: 20.0, + ), + ), + IconTheme( + data: IconThemeData( + color: + Theme.of(context).brightness == Brightness.light + ? Colors.black.withOpacity(.5) + : Colors.white.withOpacity(.3), + ), + child: const Icon( + FeatherIcons.trash2, + size: 20.0, + ), + ), + ], + ), + ), + ), + ), + ), + const SizedBox( + width: 20, + ), + ], + ), + body: SafeArea( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0), + child: Column( + children: [ + Expanded( + child: Text( + widget.note.content, + textAlign: TextAlign.justify, + style: const TextStyle(fontSize: 18.0), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/filcnaplo_mobile_ui/lib/screens/notes/notes_screen.dart b/filcnaplo_mobile_ui/lib/screens/notes/notes_screen.dart index f7478bd..97e4eeb 100644 --- a/filcnaplo_mobile_ui/lib/screens/notes/notes_screen.dart +++ b/filcnaplo_mobile_ui/lib/screens/notes/notes_screen.dart @@ -1,6 +1,7 @@ import 'dart:math'; import 'package:filcnaplo/api/providers/database_provider.dart'; +import 'package:filcnaplo/api/providers/self_note_provider.dart'; import 'package:filcnaplo/api/providers/user_provider.dart'; import 'package:filcnaplo/theme/colors/colors.dart'; import 'package:filcnaplo/utils/format.dart'; @@ -8,10 +9,15 @@ import 'package:filcnaplo_kreta_api/models/homework.dart'; import 'package:filcnaplo_kreta_api/providers/homework_provider.dart'; import 'package:filcnaplo_mobile_ui/common/empty.dart'; import 'package:filcnaplo_mobile_ui/common/panel/panel.dart'; +import 'package:filcnaplo_mobile_ui/common/soon_alert/soon_alert.dart'; import 'package:filcnaplo_mobile_ui/common/widgets/tick_tile.dart'; +import 'package:filcnaplo_mobile_ui/screens/notes/add_note_screen.dart'; +import 'package:filcnaplo_mobile_ui/screens/notes/note_view_screen.dart'; import 'package:filcnaplo_mobile_ui/screens/notes/notes_screen.i18n.dart'; +import 'package:filcnaplo_mobile_ui/screens/notes/self_note_tile.dart'; import 'package:filcnaplo_premium/providers/premium_provider.dart'; import 'package:filcnaplo_premium/ui/mobile/premium/premium_inline.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_feather_icons/flutter_feather_icons.dart'; import 'package:provider/provider.dart'; @@ -29,6 +35,7 @@ class NotesScreenState extends State { late UserProvider user; late HomeworkProvider homeworkProvider; late DatabaseProvider databaseProvider; + late SelfNoteProvider selfNoteProvider; List noteTiles = []; @@ -37,6 +44,7 @@ class NotesScreenState extends State { user = Provider.of(context); homeworkProvider = Provider.of(context); databaseProvider = Provider.of(context); + selfNoteProvider = Provider.of(context); void generateTiles() { List tiles = []; @@ -47,6 +55,7 @@ class NotesScreenState extends State { // DateTime.now().month, DateTime.now().day + 3))) .toList(); + // todo tiles List toDoTiles = []; if (hw.isNotEmpty) { @@ -77,8 +86,42 @@ class NotesScreenState extends State { )); } - if (tiles.isNotEmpty) { - } else { + // self notes + List selfNoteTiles = []; + + if (selfNoteProvider.notes.isNotEmpty) { + selfNoteTiles.addAll(selfNoteProvider.notes.map( + (e) => SelfNoteTile( + title: e.title ?? e.content.split(' ')[0], + content: e.content, + onTap: () => Navigator.of(context, rootNavigator: true).push( + CupertinoPageRoute( + builder: (context) => NoteViewScreen(note: e))), + ), + )); + } + + if (selfNoteTiles.isNotEmpty) { + // padding + tiles.add(const SizedBox( + height: 28.0, + )); + + // actual thing + tiles.add(Panel( + title: Text('your_notes'.i18n), + padding: EdgeInsets.zero, + isTransparent: true, + child: Wrap( + spacing: 18.0, + runSpacing: 18.0, + children: selfNoteTiles, + ), + )); + } + + // insert empty tile + if (tiles.isEmpty) { tiles.insert( 0, Padding( @@ -123,6 +166,7 @@ class NotesScreenState extends State { child: GestureDetector( onTap: () { // handle tap + SoonAlert.show(context: context); }, child: Container( color: Theme.of(context).colorScheme.primary.withOpacity(0.4), @@ -165,6 +209,9 @@ class NotesScreenState extends State { child: GestureDetector( onTap: () { // handle tap + Navigator.of(context, rootNavigator: true).push( + CupertinoPageRoute( + builder: (context) => const AddNoteScreen())); }, child: Container( color: Theme.of(context).colorScheme.primary.withOpacity(0.4), @@ -206,8 +253,12 @@ class NotesScreenState extends State { ), body: SafeArea( child: RefreshIndicator( - onRefresh: () async { - await homeworkProvider.fetch(); + onRefresh: () { + Provider.of(context, listen: false) + .fetch(from: DateTime.now().subtract(const Duration(days: 30))); + Provider.of(context, listen: false).restore(); + + return Future(() => null); }, child: ListView.builder( padding: EdgeInsets.zero, diff --git a/filcnaplo_mobile_ui/lib/screens/notes/notes_screen.i18n.dart b/filcnaplo_mobile_ui/lib/screens/notes/notes_screen.i18n.dart index 37cc404..02c848b 100644 --- a/filcnaplo_mobile_ui/lib/screens/notes/notes_screen.i18n.dart +++ b/filcnaplo_mobile_ui/lib/screens/notes/notes_screen.i18n.dart @@ -8,18 +8,33 @@ extension SettingsLocalization on String { "empty": "You don't have any notes", "todo": "Tasks", "homework": "Homework", + "new_note": "New Note", + "edit_note": "Edit Note", + "hint": "Note content...", + "hint_t": "Note title...", + "your_notes": "Your Notes", }, "hu_hu": { "notes": "Füzet", "empty": "Nincsenek jegyzeteid", "todo": "Feladatok", "homework": "Házi feladat", + "new_note": "Új jegyzet", + "edit_note": "Jegyzet szerkesztése", + "hint": "Jegyzet tartalma...", + "hint_t": "Jegyzet címe...", + "your_notes": "Jegyzeteid", }, "de_de": { "notes": "Broschüre", "empty": "Sie haben keine Notizen", "todo": "Aufgaben", "homework": "Hausaufgaben", + "new_note": "Neue Notiz", + "edit_note": "Notiz bearbeiten", + "hint": "Inhalt beachten...", + "hint_t": "Titel notieren...", + "your_notes": "Deine Noten", }, }; diff --git a/filcnaplo_mobile_ui/lib/screens/notes/self_note_tile.dart b/filcnaplo_mobile_ui/lib/screens/notes/self_note_tile.dart new file mode 100644 index 0000000..50d61fe --- /dev/null +++ b/filcnaplo_mobile_ui/lib/screens/notes/self_note_tile.dart @@ -0,0 +1,64 @@ +import 'package:filcnaplo/models/settings.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class SelfNoteTile extends StatelessWidget { + const SelfNoteTile( + {super.key, required this.title, required this.content, this.onTap}); + + final String title; + final String content; + final Function()? onTap; + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: onTap, + child: Column( + children: [ + Container( + height: 172.0, + width: 172.0, + padding: const EdgeInsets.all(10.0), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16.0), + color: Theme.of(context).colorScheme.background, + boxShadow: [ + if (Provider.of(context, listen: false) + .shadowEffect) + BoxShadow( + offset: const Offset(0, 21), + blurRadius: 23.0, + color: Theme.of(context).shadowColor, + ), + ], + ), + child: Text( + content.replaceAll('\n', ' '), + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.start, + maxLines: 6, + style: const TextStyle(fontSize: 17.0), + ), + ), + const SizedBox( + height: 5.0, + ), + SizedBox( + width: 152.0, + child: Text( + title, + textAlign: TextAlign.center, + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: const TextStyle( + fontWeight: FontWeight.w500, + fontSize: 14.0, + ), + ), + ), + ], + ), + ); + } +} diff --git a/filcnaplo_mobile_ui/lib/screens/settings/settings_screen.dart b/filcnaplo_mobile_ui/lib/screens/settings/settings_screen.dart index c2e334a..a959ce8 100755 --- a/filcnaplo_mobile_ui/lib/screens/settings/settings_screen.dart +++ b/filcnaplo_mobile_ui/lib/screens/settings/settings_screen.dart @@ -240,10 +240,13 @@ class SettingsScreenState extends State // ), IconButton( splashRadius: 32.0, + // onPressed: () async => await databaseProvider.userStore + // .storeSelfNotes([], userId: user.id!), onPressed: () async => _openNotes( - context, - await databaseProvider.userQuery - .toDoItems(userId: user.id!)), + context, + await databaseProvider.userQuery + .toDoItems(userId: user.id!), + ), // _showBottomSheet(user.getUser(user.id ?? "")), icon: Icon(FeatherIcons.fileText, color: AppColors.of(context).text.withOpacity(0.8)), diff --git a/filcnaplo_mobile_ui/pubspec.yaml b/filcnaplo_mobile_ui/pubspec.yaml index d02517f..177ea2f 100644 --- a/filcnaplo_mobile_ui/pubspec.yaml +++ b/filcnaplo_mobile_ui/pubspec.yaml @@ -59,6 +59,7 @@ dependencies: image_crop: git: url: https://github.com/kimaah/image_crop.git + uuid: ^4.2.2 dev_dependencies: flutter_lints: ^3.0.1