Compare commits

..

No commits in common. "22aca9618e1857ba99142f05c305de33479a4dbb" and "644955dfc8084cfa4415f5d318d6b726acfeb4cb" have entirely different histories.

5 changed files with 43 additions and 183 deletions

125
.gitignore vendored
View file

@ -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
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

View file

@ -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",
);
}
}

View file

@ -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,
),
],
),
),
],
);
}
},

View file

@ -39,7 +39,6 @@ class Woolcard extends StatelessWidget {
child: IconButton(
onPressed: () {
showModalBottomSheet(
showDragHandle: true,
context: context,
builder: (context) {
return WoolModal(id);

View file

@ -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,
)));
}
}