From dfcfda19b3cf2970cd78d3d2f62148c471b7f76c Mon Sep 17 00:00:00 2001 From: Leandro Date: Sun, 19 May 2024 16:04:47 +0200 Subject: [PATCH 1/3] better gitignore --- .gitignore | 125 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 110 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 29a3a50..7502fbb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ +# Do not remove or rename entries in this file, only add new ones +# See https://github.com/flutter/flutter/issues/128635 for more context. + # Miscellaneous *.class +*.lock *.log *.pyc *.swp @@ -8,7 +12,6 @@ .buildlog/ .history .svn/ -migrate_working_dir/ # IntelliJ related *.iml @@ -16,28 +19,120 @@ migrate_working_dir/ *.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/ +# Visual Studio Code related +.classpath +.project +.settings/ +.vscode/* + +# Flutter repo-specific +/bin/cache/ +/bin/internal/bootstrap.bat +/bin/internal/bootstrap.sh +/bin/mingit/ +/dev/benchmarks/mega_gallery/ +/dev/bots/.recipe_deps +/dev/bots/android_tools/ +/dev/devicelab/ABresults*.json +/dev/docs/doc/ +/dev/docs/api_docs.zip +/dev/docs/flutter.docs.zip +/dev/docs/lib/ +/dev/docs/pubspec.yaml +/dev/integration_tests/**/xcuserdata +/dev/integration_tests/**/Pods +/packages/flutter/coverage/ +version +analysis_benchmark.json + +# packages file containing multi-root paths +.packages.generated # Flutter/Dart/Pub related **/doc/api/ -**/ios/Flutter/.last_build_id .dart_tool/ .flutter-plugins .flutter-plugins-dependencies +**/generated_plugin_registrant.dart +.packages +.pub-preload-cache/ .pub-cache/ .pub/ -/build/ +build/ +flutter_*.png +linked_*.ds +unlinked.ds +unlinked_spec.ds -# Symbolication related +# Android related +**/android/**/gradle-wrapper.jar +.gradle/ +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java +**/android/key.properties +*.jks + +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/.generated/ +**/ios/Flutter/.last_build_id +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Flutter.podspec +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/ephemeral +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/Flutter/flutter_export_environment.sh +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* + +# macOS +**/Flutter/ephemeral/ +**/Pods/ +**/macos/Flutter/GeneratedPluginRegistrant.swift +**/macos/Flutter/ephemeral +**/xcuserdata/ + +# Windows +**/windows/flutter/generated_plugin_registrant.cc +**/windows/flutter/generated_plugin_registrant.h +**/windows/flutter/generated_plugins.cmake + +# Linux +**/linux/flutter/generated_plugin_registrant.cc +**/linux/flutter/generated_plugin_registrant.h +**/linux/flutter/generated_plugins.cmake + +# Coverage +coverage/ + +# Symbols app.*.symbols -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +!/dev/ci/**/Gemfile.lock +!.vscode/settings.json \ No newline at end of file From 2445de13affc3ae28a8e62f5b529779ae9a089b9 Mon Sep 17 00:00:00 2001 From: Leandro Date: Sun, 19 May 2024 21:07:56 +0200 Subject: [PATCH 2/3] Added floating action button --- lib/screens/wool.dart | 56 ++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/lib/screens/wool.dart b/lib/screens/wool.dart index d5ed1a4..2b5719e 100644 --- a/lib/screens/wool.dart +++ b/lib/screens/wool.dart @@ -20,32 +20,38 @@ class WoolScreen extends StatelessWidget { ); } else { // Hier können Sie den Inhalt basierend auf den geladenen Daten anzeigen - return Column( - children: [ - Expanded( - child: ListView.builder( - itemBuilder: (BuildContext context, int index) { - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 10), - child: Column( - children: [ - Woolcard( - index, - snapshot.data[index].manufacture, - snapshot.data[index].title, - snapshot.data[index].color, - ), - const SizedBox( - height: 15, - ) - ], - ), - ); - }, - itemCount: snapshot.data.length, + return Scaffold( + floatingActionButton: FloatingActionButton( + onPressed: () {}, + child: Icon(Icons.add), + ), + body: Column( + children: [ + Expanded( + child: ListView.builder( + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 10), + child: Column( + children: [ + Woolcard( + index, + snapshot.data[index].manufacture, + snapshot.data[index].title, + snapshot.data[index].color, + ), + const SizedBox( + height: 15, + ) + ], + ), + ); + }, + itemCount: snapshot.data.length, + ), ), - ), - ], + ], + ), ); } }, From 22aca9618e1857ba99142f05c305de33479a4dbb Mon Sep 17 00:00:00 2001 From: Leandro Date: Sun, 19 May 2024 22:50:43 +0200 Subject: [PATCH 3/3] inital add wool modal design --- lib/screens/add_wool_modal.dart | 19 +++++++++++++++++++ lib/screens/wool.dart | 11 ++++++++++- lib/widgets/cards/wool_card.dart | 1 + lib/widgets/modal_wrapper.dart | 18 ++++++++++++++---- 4 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 lib/screens/add_wool_modal.dart diff --git a/lib/screens/add_wool_modal.dart b/lib/screens/add_wool_modal.dart new file mode 100644 index 0000000..7ab24fd --- /dev/null +++ b/lib/screens/add_wool_modal.dart @@ -0,0 +1,19 @@ +import 'package:flutter/material.dart'; +import 'package:temperaturdecke/widgets/modal_wrapper.dart'; + +class AddWoolModal extends StatelessWidget { + const AddWoolModal({super.key}); + + @override + Widget build(BuildContext context) { + return ModalWrapper( + Column( + children: [ + TextField(), + TextField(), + ], + ), + title: "Wolle hinzufügen", + ); + } +} diff --git a/lib/screens/wool.dart b/lib/screens/wool.dart index 2b5719e..7a45422 100644 --- a/lib/screens/wool.dart +++ b/lib/screens/wool.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:temperaturdecke/database.dart'; +import 'package:temperaturdecke/screens/add_wool_modal.dart'; import 'package:temperaturdecke/widgets/cards/wool_card.dart'; class WoolScreen extends StatelessWidget { @@ -22,7 +23,15 @@ class WoolScreen extends StatelessWidget { // Hier können Sie den Inhalt basierend auf den geladenen Daten anzeigen return Scaffold( floatingActionButton: FloatingActionButton( - onPressed: () {}, + onPressed: () { + showModalBottomSheet( + showDragHandle: true, + context: context, + builder: (context) { + return AddWoolModal(); + }, + ); + }, child: Icon(Icons.add), ), body: Column( diff --git a/lib/widgets/cards/wool_card.dart b/lib/widgets/cards/wool_card.dart index bfcfde1..c1f1881 100644 --- a/lib/widgets/cards/wool_card.dart +++ b/lib/widgets/cards/wool_card.dart @@ -39,6 +39,7 @@ class Woolcard extends StatelessWidget { child: IconButton( onPressed: () { showModalBottomSheet( + showDragHandle: true, context: context, builder: (context) { return WoolModal(id); diff --git a/lib/widgets/modal_wrapper.dart b/lib/widgets/modal_wrapper.dart index f97b918..e1216b9 100644 --- a/lib/widgets/modal_wrapper.dart +++ b/lib/widgets/modal_wrapper.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; class ModalWrapper extends StatelessWidget { - ModalWrapper(this.child, {super.key}); + ModalWrapper(this.child, {this.title, key}); Widget child; - + String? title; @override Widget build(BuildContext context) { return ClipRRect( @@ -12,8 +12,18 @@ class ModalWrapper extends StatelessWidget { child: SizedBox( width: 750, child: Padding( - padding: EdgeInsets.all(10), - child: child, + padding: EdgeInsets.symmetric(horizontal: 25, vertical: 10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title ?? "", + textAlign: TextAlign.start, + style: Theme.of(context).textTheme.headlineMedium, + ), + child + ], + ), ))); } }