diff --git a/.gitignore b/.gitignore index 7502fbb..29a3a50 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,5 @@ -# 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 @@ -12,6 +8,7 @@ .buildlog/ .history .svn/ +migrate_working_dir/ # IntelliJ related *.iml @@ -19,120 +16,28 @@ *.iws .idea/ -# 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 +# 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 -**/generated_plugin_registrant.dart -.packages -.pub-preload-cache/ .pub-cache/ .pub/ -build/ -flutter_*.png -linked_*.ds -unlinked.ds -unlinked_spec.ds +/build/ -# 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 +# Symbolication related app.*.symbols -# 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 +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/lib/screens/add_wool_modal.dart b/lib/screens/add_wool_modal.dart deleted file mode 100644 index 7ab24fd..0000000 --- a/lib/screens/add_wool_modal.dart +++ /dev/null @@ -1,19 +0,0 @@ -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 7a45422..d5ed1a4 100644 --- a/lib/screens/wool.dart +++ b/lib/screens/wool.dart @@ -1,7 +1,6 @@ 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 { @@ -21,46 +20,32 @@ class WoolScreen extends StatelessWidget { ); } else { // Hier können Sie den Inhalt basierend auf den geladenen Daten anzeigen - return Scaffold( - floatingActionButton: FloatingActionButton( - onPressed: () { - showModalBottomSheet( - showDragHandle: true, - context: context, - builder: (context) { - return AddWoolModal(); + 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, + ) + ], + ), + ); }, - ); - }, - 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, - ), + itemCount: snapshot.data.length, ), - ], - ), + ), + ], ); } }, diff --git a/lib/widgets/cards/wool_card.dart b/lib/widgets/cards/wool_card.dart index c1f1881..bfcfde1 100644 --- a/lib/widgets/cards/wool_card.dart +++ b/lib/widgets/cards/wool_card.dart @@ -39,7 +39,6 @@ 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 e1216b9..f97b918 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, {this.title, key}); + ModalWrapper(this.child, {super.key}); Widget child; - String? title; + @override Widget build(BuildContext context) { return ClipRRect( @@ -12,18 +12,8 @@ class ModalWrapper extends StatelessWidget { child: SizedBox( width: 750, child: Padding( - 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 - ], - ), + padding: EdgeInsets.all(10), + child: child, ))); } }