diff --git a/.metadata b/.metadata index 3fdf532..87fe974 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled. version: - revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 + revision: f72efea43c3013323d1b95cff571f3c1caa37583 channel: stable project_type: app @@ -13,26 +13,26 @@ project_type: app migration: platforms: - platform: root - create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 - base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 + create_revision: f72efea43c3013323d1b95cff571f3c1caa37583 + base_revision: f72efea43c3013323d1b95cff571f3c1caa37583 - platform: android - create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 - base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 + create_revision: f72efea43c3013323d1b95cff571f3c1caa37583 + base_revision: f72efea43c3013323d1b95cff571f3c1caa37583 - platform: ios - create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 - base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 + create_revision: f72efea43c3013323d1b95cff571f3c1caa37583 + base_revision: f72efea43c3013323d1b95cff571f3c1caa37583 - platform: linux - create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 - base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 + create_revision: f72efea43c3013323d1b95cff571f3c1caa37583 + base_revision: f72efea43c3013323d1b95cff571f3c1caa37583 - platform: macos - create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 - base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 + create_revision: f72efea43c3013323d1b95cff571f3c1caa37583 + base_revision: f72efea43c3013323d1b95cff571f3c1caa37583 - platform: web - create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 - base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 + create_revision: f72efea43c3013323d1b95cff571f3c1caa37583 + base_revision: f72efea43c3013323d1b95cff571f3c1caa37583 - platform: windows - create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 - base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849 + create_revision: f72efea43c3013323d1b95cff571f3c1caa37583 + base_revision: f72efea43c3013323d1b95cff571f3c1caa37583 # User provided section diff --git a/android/app/src/main/kotlin/com/oggauergemeindetrommler/oggauer_gemeindetrommler/MainActivity.kt b/android/app/src/main/kotlin/com/oggauergemeindetrommler/oggauer_gemeindetrommler/MainActivity.kt new file mode 100644 index 0000000..88ec1ed --- /dev/null +++ b/android/app/src/main/kotlin/com/oggauergemeindetrommler/oggauer_gemeindetrommler/MainActivity.kt @@ -0,0 +1,6 @@ +package com.oggauergemeindetrommler.oggauer_gemeindetrommler + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 6507b15..5bc1e83 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -171,6 +171,7 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -185,6 +186,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -294,7 +296,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.demoapp; + PRODUCT_BUNDLE_IDENTIFIER = com.oggauergemeindetrommler.oggauerGemeindetrommler; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -422,7 +424,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.demoapp; + PRODUCT_BUNDLE_IDENTIFIER = com.oggauergemeindetrommler.oggauerGemeindetrommler; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -444,7 +446,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.demoapp; + PRODUCT_BUNDLE_IDENTIFIER = com.oggauergemeindetrommler.oggauerGemeindetrommler; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index 28c6bf0..7353c41 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 2ccbfd9..797d452 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index f091b6b..6ed2d93 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 4cde121..4cd7b00 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index d0ef06e..fe73094 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index dcdc230..321773c 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 2ccbfd9..797d452 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index c8f9ed8..502f463 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index a6d6b86..0ec3034 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index a6d6b86..0ec3034 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index 75b2d16..e9f5fea 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index c4df70d..84ac32a 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 6a84f41..8953cba 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index d0e1f58..0467bf1 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist deleted file mode 100644 index 09843cb..0000000 --- a/ios/Runner/GoogleService-Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CLIENT_ID - 576683162451-vf1g0qoge66lb3bmpsg4neckv4opovub.apps.googleusercontent.com - REVERSED_CLIENT_ID - com.googleusercontent.apps.576683162451-vf1g0qoge66lb3bmpsg4neckv4opovub - API_KEY - AIzaSyDV441PhkPEC7igZmYMpJ_axLMc2bKQ5fY - GCM_SENDER_ID - 576683162451 - PLIST_VERSION - 1 - BUNDLE_ID - com.oggauergemeindetrommler.app - PROJECT_ID - gemeinde-trommler - STORAGE_BUCKET - gemeinde-trommler.appspot.com - IS_ADS_ENABLED - - IS_ANALYTICS_ENABLED - - IS_APPINVITE_ENABLED - - IS_GCM_ENABLED - - IS_SIGNIN_ENABLED - - GOOGLE_APP_ID - 1:576683162451:ios:2fd841a4b4ca70d5083fa6 - - \ No newline at end of file diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 07291c0..5175c87 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -5,15 +5,15 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Oggauer GemeindeTrommler + Oggauer Gemeindetrommler CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.oggauergemeindetrommler.app + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName - oggauer_gemeinde_trommler + oggauer_gemeindetrommler CFBundlePackageType APPL CFBundleShortVersionString diff --git a/ios/firebase_app_id_file.json b/ios/firebase_app_id_file.json deleted file mode 100644 index a6b0f8b..0000000 --- a/ios/firebase_app_id_file.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "file_generated_by": "FlutterFire CLI", - "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", - "GOOGLE_APP_ID": "1:576683162451:ios:f3e9140edfc4c945083fa6", - "FIREBASE_PROJECT_ID": "gemeinde-trommler", - "GCM_SENDER_ID": "576683162451" -} \ No newline at end of file diff --git a/lib/AddPage.dart b/lib/AddPage.dart index d748a0e..353f507 100644 --- a/lib/AddPage.dart +++ b/lib/AddPage.dart @@ -9,7 +9,7 @@ import 'package:cloud_firestore/cloud_firestore.dart'; class AddScreen extends StatefulWidget { final int initialIndex; - AddScreen({required this.initialIndex}); + const AddScreen({super.key, required this.initialIndex}); @override _AddScreenState createState() => _AddScreenState(); @@ -23,67 +23,84 @@ class _AddScreenState extends State { bool _uploading = false; int _selectedIndex = 0; + @override void initState() { super.initState(); _selectedIndex = widget.initialIndex; } + Future isFileSizeValid(File file, int maxSizeInMB) async { + final fileSize = await file.length(); + final maxSizeInBytes = maxSizeInMB * 1024 * 1024; + return fileSize <= maxSizeInBytes; + } + Future _getImage(ImageSource source) async { - final pickedFile = await ImagePicker().getImage(source: source); + final pickedFile = await ImagePicker().pickImage(source: source); if (pickedFile != null) { - setState(() { - _imageFile = File(pickedFile.path); - }); + final tempFile = File(pickedFile.path); + final bool isValid = await isFileSizeValid(tempFile, 10); + if (isValid) { + setState(() { + _imageFile = tempFile; + }); + } else { + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('Die Dateigröße darf maximal 10 MB betragen.')), + ); + } } } - Future addNewElementToFirestore(String title, String description, File imageFile) async { - // Zunächst das Bild in Firebase Storage speichern - - - // Das neue Element in der Firestore-Sammlung "Issues" speichern - if(_selectedIndex == 1) - { - Reference ref = FirebaseStorage.instance.ref().child("Issues/${DateTime.now().toString()}"); - UploadTask uploadTask = ref.putFile(imageFile); - String imageUrl = await (await uploadTask).ref.getDownloadURL(); - - await FirebaseFirestore.instance.collection("Issues").add({ - "title": title, - "description": description, - "imageUrl": imageUrl, - "createdDate": DateTime.now(), - }); - } - else - { - Reference ref = FirebaseStorage.instance.ref().child("News/${DateTime.now().toString()}"); - UploadTask uploadTask = ref.putFile(imageFile); - String imageUrl = await (await uploadTask).ref.getDownloadURL(); - await FirebaseFirestore.instance.collection("News").add({ - "title": title, - "description": description, - "imageUrl": imageUrl, - "createdDate": DateTime.now(), - }); + String collectionName; + if (_selectedIndex == 0) { + collectionName = "CitizensForum"; + } else if (_selectedIndex == 1) { + collectionName = "News"; + } else { + collectionName = "Issues"; } + String imageUrl = await uploadImageToFirebaseStorage(imageFile, collectionName); + + await FirebaseFirestore.instance.collection(collectionName).add({ + "title": title, + "description": description, + "imageUrl": imageUrl, + "createdDate": DateTime.now(), + }); } + Future uploadImageToFirebaseStorage(File imageFile, String collectionName) async { + Reference ref = FirebaseStorage.instance.ref().child("$collectionName/${DateTime.now().toString()}"); + UploadTask uploadTask = ref.putFile(imageFile); + return await (await uploadTask).ref.getDownloadURL(); + } + + @override Widget build(BuildContext context) { + String appBarTitle = ''; + + if (_selectedIndex == 0) { + appBarTitle = 'Neue BürgerForum Information'; + } else if (_selectedIndex == 1) { + appBarTitle = 'Neue Neuigkeit'; + } else if (_selectedIndex == 2) { + appBarTitle = 'Neuer Mängel'; + } return Scaffold( appBar: AppBar( - title: Text('Neues Element hinzufügen'), + title: Text(appBarTitle), actions: [ Padding( padding: const EdgeInsets.only(right: 8.0), child: IconButton( - icon: Icon(Icons.refresh), + icon: const Icon(Icons.refresh), onPressed: () { _titleController.clear(); _descriptionController.clear(); @@ -96,14 +113,17 @@ class _AddScreenState extends State { Padding( padding: const EdgeInsets.only(right: 8.0), child: IconButton( - icon: Icon(Icons.check), + icon: const Icon(Icons.check), onPressed: () async { - if (_formKey.currentState!.validate() && _imageFile != null && !_uploading) { + if (_formKey.currentState!.validate() && _imageFile != null && + !_uploading) { setState(() { _uploading = true; }); try { - await addNewElementToFirestore(_titleController.text, _descriptionController.text, _imageFile!); + await addNewElementToFirestore( + _titleController.text, _descriptionController.text, + _imageFile!); Navigator.pop(context); } catch (e) { print(e); @@ -115,7 +135,6 @@ class _AddScreenState extends State { } } }, - ), ), ], @@ -143,7 +162,7 @@ class _AddScreenState extends State { return null; }, ), - SizedBox(height: 16.0), + const SizedBox(height: 16.0), TextFormField( decoration: InputDecoration( labelText: 'Beschreibung', @@ -161,53 +180,98 @@ class _AddScreenState extends State { return null; }, ), - SizedBox(height: 16.0), + const SizedBox(height: 16.0), _imageFile != null ? Image.file(_imageFile!) : Container( - height: 150.0, - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: BorderRadius.circular(16.0), - ), - child: Center( - child: TextButton( - onPressed: () { - showModalBottomSheet( - context: context, - builder: (context) => Column( - mainAxisSize: MainAxisSize.min, - children: [ - ListTile( - leading: Icon(Icons.photo_library), - title: Text('Galerie auswählen'), - onTap: () { - Navigator.pop(context); - _getImage(ImageSource.gallery); - }, // + height: 200.0, + decoration: BoxDecoration( + color: Colors.grey[200], + borderRadius: BorderRadius.circular(16.0), + ), + child: Center( + child: TextButton( + onPressed: () { + showModalBottomSheet( + context: context, + builder: (context) => + Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + height: 60, + padding: const EdgeInsets.symmetric( + horizontal: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment + .spaceBetween, + children: [ + const Text( + 'Bild hinzufügen', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + ), + ), + IconButton( + icon: const Icon(Icons.close), + onPressed: () { + Navigator.pop(context); + }, + ), + ], ), - ListTile( - leading: Icon(Icons.camera_alt), - title: Text('Kamera verwenden'), - onTap: () { - Navigator.pop(context); - _getImage(ImageSource.camera); - }, + ), + Center( + child: Container( + height: 80, + child: ListTile( + leading: const Icon( + Icons.photo_library, size: 40), + title: const Text( + 'Galerie auswählen', + style: TextStyle(fontSize: 20), + ), + onTap: () { + Navigator.pop(context); + _getImage(ImageSource.gallery); + }, + ), ), - ], - ), - ); - }, - child: Text( - 'Bild hinzufügen', - style: TextStyle( - color: Theme.of(context).primaryColor, - fontWeight: FontWeight.bold, + ), + Center( + child: Container( + height: 80, + child: ListTile( + leading: const Icon( + Icons.camera_alt, size: 40), + title: const Text( + 'Kamera verwenden', + style: TextStyle(fontSize: 20), + ), + onTap: () { + Navigator.pop(context); + _getImage(ImageSource.camera); + }, + ), + ), + ), + ], ), - ), - ), + ); + }, + child: Text( + 'Bild hinzufügen', + style: TextStyle( + color: Theme + .of(context) + .primaryColor, + fontWeight: FontWeight.bold, ), ), + ), + ), + ), ], ), ), diff --git a/lib/DetailPage.dart b/lib/DetailPage.dart index 155ccb4..990d938 100644 --- a/lib/DetailPage.dart +++ b/lib/DetailPage.dart @@ -1,3 +1,4 @@ +import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; @@ -5,14 +6,14 @@ class DetailPage extends StatelessWidget { final String title; final String datum; final String description; - final Image? image; + final String imageUrl; const DetailPage({ Key? key, required this.title, required this.datum, required this.description, - required this.image, + required this.imageUrl, }) : super(key: key); @override @@ -27,7 +28,17 @@ class DetailPage extends StatelessWidget { children: [ Container( padding: const EdgeInsets.all(8.0), - child: image, + child: CachedNetworkImage( + imageUrl: imageUrl, + placeholder: (context, url) => const Center( + child: SizedBox( + width: 50, + height: 50, + child: CircularProgressIndicator(), + ), + ), + errorWidget: (context, url, error) => Icon(Icons.error), + ), ), Container( padding: const EdgeInsets.all(8.0), @@ -63,60 +74,3 @@ class DetailPage extends StatelessWidget { ); } } - - - - - -/*import 'package:flutter/material.dart'; - -class DetailPage extends StatelessWidget { - final String title; - final String description; - final Image? image; - - const DetailPage({ - super.key, - required this.title, - required this.description, - required this.image, - }); - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text(title), - ), - body: SingleChildScrollView( - child: Column( - children: [ - Container( - padding: const EdgeInsets.all(8.0), - child: image, - ), - Container( - padding: const EdgeInsets.all(8.0), - child: Text( - title, - style: const TextStyle( - fontSize: 24, - ), - ), - ), - Container( - padding: const EdgeInsets.all(8.0), - child: Text( - description, - style: const TextStyle( - fontSize: 18, - ), - ), - ), - ], - ), - ), - ); - } -}*/ - diff --git a/lib/UserDefinedList.dart b/lib/UserDefinedList.dart index 73eecee..92b25cc 100644 --- a/lib/UserDefinedList.dart +++ b/lib/UserDefinedList.dart @@ -1,3 +1,4 @@ +import 'package:cached_network_image/cached_network_image.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; import 'DetailPage.dart'; @@ -7,14 +8,14 @@ class UserDefinedItem extends StatelessWidget { final String title; final String datum; final String description; - final Image? image; + final String imageUrl; const UserDefinedItem({ Key? key, required this.title, required this.description, required this.datum, - this.image, + required this.imageUrl, }) : super(key: key); @override @@ -26,12 +27,13 @@ class UserDefinedItem extends StatelessWidget { Navigator.push( context, MaterialPageRoute( - builder: (context) => DetailPage( - title: title, - datum: datum, - description: description, - image: image != null ? image! : null, - ), + builder: (context) => + DetailPage( + title: title, + datum: datum, + description: description, + imageUrl: imageUrl, + ), ), ); }, @@ -41,7 +43,19 @@ class UserDefinedItem extends StatelessWidget { SizedBox( width: 120, height: 120, - child: image, + child: CachedNetworkImage( + imageUrl: imageUrl, + placeholder: (context, url) => const Center( + child: SizedBox( + width: 50, + height: 50, + child: CircularProgressIndicator(), + ), + ), + errorWidget: (context, url, error) => Icon(Icons.error), + ), + + ), Flexible( flex: 1, @@ -59,21 +73,20 @@ class UserDefinedItem extends StatelessWidget { overflow: TextOverflow.ellipsis, style: const TextStyle( fontSize: 20, - fontWeight: FontWeight.bold// beliebige Schriftgröße - ), + fontWeight: FontWeight.bold), ), ), Text( datum, style: const TextStyle( - fontSize: 15, // beliebige Schriftgröße + fontSize: 15, ), ), ], ), ), Padding( - padding: const EdgeInsets.all(8.0), // feste Höhe für 2 Zeilen + padding: const EdgeInsets.all(8.0), child: Text( description, maxLines: 3, @@ -93,6 +106,11 @@ class UserDefinedItem extends StatelessWidget { } } +// ... + +// Ändern Sie die Verwendung von Image.network in UserDefinedItem-Widgets in Ihren ListView.builder-Aufrufen: + + class NewsList extends StatefulWidget { const NewsList({Key? key}) : super(key: key); @@ -108,7 +126,18 @@ class _NewsListState extends State { @override void initState() { super.initState(); - newsStream = firestore.collection('News').snapshots(); + + // Enable persistence + firestore.enablePersistence(); + + // Enable network + firestore.settings = Settings(cacheSizeBytes: Settings.CACHE_SIZE_UNLIMITED); + + // Configure the stream to use the cache first and then the server + newsStream = firestore + .collection('News') + .orderBy('createdDate', descending: true) + .snapshots(includeMetadataChanges: true); } @override @@ -127,130 +156,17 @@ class _NewsListState extends State { return ListView.builder( itemCount: documents.length, itemBuilder: (BuildContext context, int index) { - final Map data = documents[index].data()! as Map; - final DateTime createdDate = data['createdDate'].toDate(); - final formattedDate = DateFormat('dd.MM.yyyy').format(createdDate); - return Dismissible( - key: Key(documents[index].id), - direction: DismissDirection.endToStart, - onDismissed: (direction) async { - await firestore.collection('News').doc(documents[index].id).delete(); - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text("News wurde gelöscht"), - )); - }, - background: Container( - color: Colors.red, - alignment: Alignment.centerRight, - child: const Icon( - Icons.delete, - color: Colors.white, - ), - ), - child: UserDefinedItem( - title: data['title'] ?? '', - datum: formattedDate, - description: data['description'] ?? '', - image: Image.network((data['imageUrl'])), - ), - ); - }, - ); - } - }, - ); - } -} - - -/* -class NewsList extends StatefulWidget { - const NewsList({Key? key}) : super(key: key); - - @override - _NewsListState createState() => _NewsListState(); -} - -class _NewsListState extends State { - final FirebaseFirestore firestore = FirebaseFirestore.instance; - late Stream newsStream; - - @override - void initState() { - super.initState(); - newsStream = firestore.collection('News').snapshots(); - } - - @override - Widget build(BuildContext context) { - return StreamBuilder( - stream: newsStream, - builder: (BuildContext context, AsyncSnapshot snapshot) { - if (snapshot.hasError) { - return Text('Error: ${snapshot.error}'); - } - switch (snapshot.connectionState) { - case ConnectionState.waiting: - return const Text('Loading...'); - default: - final List documents = snapshot.data!.docs; - return ListView.builder( - itemCount: documents.length, - itemBuilder: (BuildContext context, int index) { - final Map data = documents[index] - .data()! as Map; - final DateTime createdDate = data['createdDate'].toDate(); - final formattedDate = DateFormat('dd.MM.yyyy').format( - createdDate); - return Dismissible( - key: UniqueKey(), - onDismissed: (direction) { - setState(() { - documents.removeAt(index); - }); - }, - child: UserDefinedItem( - title: data['title'] ?? '', - datum: formattedDate, - description: data['description'] ?? '', - image: Image.network((data['imageUrl'])), - ), - ); - }, - ); - } - }, - ); - } -} -*/ - - - /* - @override - Widget build(BuildContext context) { - return StreamBuilder( - stream: newsStream, - builder: (BuildContext context, AsyncSnapshot snapshot) { - if (snapshot.hasError) { - return Text('Error: ${snapshot.error}'); - } - switch (snapshot.connectionState) { - case ConnectionState.waiting: - return const Text('Loading...'); - default: - final List documents = snapshot.data!.docs; - return ListView.builder( - itemCount: documents.length, - itemBuilder: (BuildContext context, int index) { - final Map data = documents[index].data()! as Map; - final DateTime createdDate = data['createdDate'].toDate(); - final formattedDate = DateFormat('dd.MM.yyyy').format(createdDate); + final Map data = + documents[index].data()! as Map; + final DateTime createdDate = + data['createdDate'].toDate(); + final formattedDate = + DateFormat('dd.MM.yyyy').format(createdDate); return UserDefinedItem( title: data['title'] ?? '', datum: formattedDate, description: data['description'] ?? '', - image: Image.network((data['imageUrl'])), + imageUrl: data['imageUrl'] ?? '', ); }, ); @@ -259,15 +175,12 @@ class _NewsListState extends State { ); } } -*/ - class IssueList extends StatefulWidget { const IssueList({Key? key}) : super(key: key); @override _IssueListState createState() => _IssueListState(); } - class _IssueListState extends State { final FirebaseFirestore firestore = FirebaseFirestore.instance; late Stream issueStream; @@ -275,7 +188,18 @@ class _IssueListState extends State { @override void initState() { super.initState(); - issueStream = firestore.collection('Issues').snapshots(); + + // Enable persistence + firestore.enablePersistence(); + + // Enable network + firestore.settings = Settings(cacheSizeBytes: Settings.CACHE_SIZE_UNLIMITED); + + // Configure the stream to use the cache first and then the server + issueStream = firestore + .collection('Issues') + .orderBy('createdDate', descending: true) + .snapshots(includeMetadataChanges: true); } @override @@ -294,14 +218,17 @@ class _IssueListState extends State { return ListView.builder( itemCount: documents.length, itemBuilder: (BuildContext context, int index) { - final Map data = documents[index].data()! as Map; - final DateTime createdDate = data['createdDate'].toDate(); - final formattedDate = DateFormat('dd.MM.yyyy').format(createdDate); + final Map data = + documents[index].data()! as Map; + final DateTime createdDate = + data['createdDate'].toDate(); + final formattedDate = + DateFormat('dd.MM.yyyy').format(createdDate); return UserDefinedItem( title: data['title'] ?? '', datum: formattedDate, description: data['description'] ?? '', - image: Image.network((data['imageUrl'])), + imageUrl: data['imageUrl'] ?? '', ); }, ); @@ -314,24 +241,35 @@ class CitizensForum extends StatefulWidget { const CitizensForum({Key? key}) : super(key: key); @override - _CitizensForum createState() => _CitizensForum(); + _CitizensForumState createState() => _CitizensForumState(); } -class _CitizensForum extends State { +class _CitizensForumState extends State { final FirebaseFirestore firestore = FirebaseFirestore.instance; - late Stream citizenStream; + late Stream>> citizenStream; @override void initState() { super.initState(); - citizenStream = firestore.collection('CitizensForum').snapshots(); + + // Enable persistence + firestore.enablePersistence(); + + // Enable network + firestore.settings = Settings(cacheSizeBytes: Settings.CACHE_SIZE_UNLIMITED); + + // Configure the stream to use the cache first and then the server + citizenStream = firestore + .collection('CitizensForum') + .orderBy('createdDate', descending: true) + .snapshots(includeMetadataChanges: true); } @override Widget build(BuildContext context) { - return StreamBuilder( + return StreamBuilder>>( stream: citizenStream, - builder: (BuildContext context, AsyncSnapshot snapshot) { + builder: (BuildContext context, AsyncSnapshot>> snapshot) { if (snapshot.hasError) { return Text('Error: ${snapshot.error}'); } @@ -339,18 +277,18 @@ class _CitizensForum extends State { case ConnectionState.waiting: return const Text('Loading...'); default: - final List documents = snapshot.data!.docs; + final List>> documents = snapshot.data!.docs; return ListView.builder( itemCount: documents.length, itemBuilder: (BuildContext context, int index) { - final Map data = documents[index].data()! as Map; + final Map data = documents[index].data(); final DateTime createdDate = data['createdDate'].toDate(); final formattedDate = DateFormat('dd.MM.yyyy').format(createdDate); return UserDefinedItem( title: data['title'] ?? '', datum: formattedDate, description: data['description'] ?? '', - image: Image.network((data['imageUrl'])), + imageUrl: data['imageUrl'] ?? '', ); }, ); diff --git a/lib/home.dart b/lib/home.dart index b3d8033..ff3762c 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'UserDefinedList.dart'; class MyHomePage extends StatefulWidget { - const MyHomePage({super.key, required this.title}); + const MyHomePage({Key? key, required this.title}); final String title; @@ -14,89 +14,86 @@ class MyHomePage extends StatefulWidget { class _MyHomePageState extends State { int _selectedIndex = 0; bool login = false; - bool isIssueItemEnabled = true; static const TextStyle optionStyle = - TextStyle(fontSize: 30, fontWeight: FontWeight.bold); + TextStyle(fontSize: 30, fontWeight: FontWeight.bold); + void _onItemTapped(int index) { setState(() { _selectedIndex = index; }); } + void setLogin(bool value) { setState(() { login = value; - isIssueItemEnabled = value; }); } + @override Widget build(BuildContext context) { final List widgetOptions = [ + const CitizensForum(), const NewsList(), - login ? const IssueList(): const Text( - 'Mängel (nur für angemeldete Benutzer verfügbar)', - style: optionStyle, - textAlign: TextAlign.center, - ), - Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - ElevatedButton( - child: Text(login ? 'Logout' : 'Login'), - onPressed: () { - setLogin(!login); - }, - ), - const Text( - 'Index 2: Profil', - style: optionStyle, - ), - ], - ), + const IssueList(), + Column(mainAxisAlignment: MainAxisAlignment.center, children: [ + ElevatedButton( + child: Text(login ? 'Logout' : 'Login'), + onPressed: () { + setLogin(!login); + }, + ), + const Text( + 'Index 2: Profil', + style: optionStyle, + ), + ]) ]; return Scaffold( appBar: AppBar( title: const Text('Oggauer Gemeinde Trommler'), - - ), body: Center( child: widgetOptions.elementAt(_selectedIndex), - ), - - floatingActionButton: FloatingActionButton( + floatingActionButton: _selectedIndex == 3 // Wenn der ausgewählte Index 3 ist, also auf dem Profil-Widget + ? null // Zeigt keinen Button an + : FloatingActionButton( onPressed: () { Navigator.push( context, - MaterialPageRoute(builder: (context) => AddScreen(initialIndex: _selectedIndex,)), + MaterialPageRoute( + builder: (context) => AddScreen(initialIndex: _selectedIndex)), ); }, tooltip: "Add", child: Icon(Icons.add), ), - bottomNavigationBar: BottomNavigationBar( - items: const - [ + items: const [ + BottomNavigationBarItem( + icon: Icon(Icons.person), + label: 'BürgerForum', + ), BottomNavigationBarItem( icon: Icon(Icons.newspaper), - label: 'News', + label: 'Neuigkeiten', ), BottomNavigationBarItem( icon: Icon(Icons.report), label: 'Mängel', ), BottomNavigationBarItem( - icon: Icon(Icons.person), + icon: Icon(Icons.account_circle), label: 'Profil', ), ], currentIndex: _selectedIndex, selectedItemColor: Colors.blue, + unselectedItemColor: Colors.black26, onTap: _onItemTapped, ), ); } -} \ No newline at end of file +} diff --git a/lib/main.dart b/lib/main.dart index 6a451e2..2aa1d9e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,4 +1,5 @@ //TEST, TEST +import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; import 'home.dart'; diff --git a/pubspec.lock b/pubspec.lock index 15ba417..2eec1f5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,10 +5,18 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: f175bc1414e4edf8c5b83372c98eeabecf8353f39c9da423c2cfdf1f1f508788 + sha256: "6a0ad72b2bcdb461749e40c01c478212a78db848dfcb2f10f2a461988bc5fb29" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" + archive: + dependency: transitive + description: + name: archive + sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a" + url: "https://pub.dev" + source: hosted + version: "3.3.7" async: dependency: transitive description: @@ -25,6 +33,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + cached_network_image: + dependency: "direct main" + description: + name: cached_network_image + sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15 + url: "https://pub.dev" + source: hosted + version: "3.2.3" + cached_network_image_platform_interface: + dependency: transitive + description: + name: cached_network_image_platform_interface + sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7 + url: "https://pub.dev" + source: hosted + version: "2.0.0" + cached_network_image_web: + dependency: transitive + description: + name: cached_network_image_web + sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0 + url: "https://pub.dev" + source: hosted + version: "1.0.2" change_app_package_name: dependency: "direct main" description: @@ -53,26 +85,26 @@ packages: dependency: "direct main" description: name: cloud_firestore - sha256: f5431cf41ab5c5e9c64e03ac2af103e10be22bf89020f394130c04b81add0010 + sha256: "7e15d929d3d82774bffaf4b2c0bfc85b429fe08dff7280a601c43f309cea1ebf" url: "https://pub.dev" source: hosted - version: "4.5.1" + version: "4.5.3" cloud_firestore_platform_interface: dependency: transitive description: name: cloud_firestore_platform_interface - sha256: "29349a0687bc31290ab81d1de2b1cdadb40d0ea3ab30d247323c6c5be0d4c6fc" + sha256: "76ba7b9dd43ce7f07e75a2349f3eb3e2c61e1bea88fec4798c3377cccf44cd7a" url: "https://pub.dev" source: hosted - version: "5.12.0" + version: "5.12.1" cloud_firestore_web: dependency: transitive description: name: cloud_firestore_web - sha256: "228f1944fb3c61ddf5de3647ec5b6ed88d6aacb0a4d485ef597c1211fe98ef8b" + sha256: "0c1305722339e0b3fc0ce62bf6233b3f8762cc105a26af02171b849e6a3b3727" url: "https://pub.dev" source: hosted - version: "3.4.1" + version: "3.4.2" collection: dependency: transitive description: @@ -81,6 +113,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.17.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" cross_file: dependency: transitive description: @@ -89,6 +129,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.3+4" + crypto: + dependency: transitive + description: + name: crypto + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + url: "https://pub.dev" + source: hosted + version: "3.0.2" cupertino_icons: dependency: "direct main" description: @@ -105,38 +153,54 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + file: + dependency: transitive + description: + name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" + source: hosted + version: "6.1.4" firebase_auth: dependency: "direct main" description: name: firebase_auth - sha256: e5254a39daab8c5bc76b17f5a161c11a7a97a3718cd314f460e2b4366c850c7d + sha256: "8c97619ed2633148c41c344a59461f23c73bf8aa477ae48296703f06d9621fb0" url: "https://pub.dev" source: hosted - version: "4.4.1" + version: "4.4.2" firebase_auth_platform_interface: dependency: transitive description: name: firebase_auth_platform_interface - sha256: "5d5f283517ba34afd69ef448cc81ea23bcf8887393bedae4f70f45060b045fb9" + sha256: f7db119be795d79533c503887075a0315fc3ae1da6f9a9cd4f9100a62c68859c url: "https://pub.dev" source: hosted - version: "6.13.0" + version: "6.13.1" firebase_auth_web: dependency: transitive description: name: firebase_auth_web - sha256: c631ec90d05c990fe971774ff12e96ee88fc3dd22839d5cab3b04c8693859116 + sha256: "45687246f5be811baf3810652460acd0f3d8c98f9d8f8b1961d7cc5c15c1e803" url: "https://pub.dev" source: hosted - version: "5.3.1" + version: "5.3.2" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: ed611fb8e67e43ecc7956f242cecca383d87cf71aace27287aa5dd4bdba4ac07 + sha256: "239e4ac688674a7e7b5476fd16b0d8e2b5a453d464f32091af3ce1df4ebb7316" url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.10.0" firebase_core_platform_interface: dependency: transitive description: @@ -157,31 +221,47 @@ packages: dependency: "direct main" description: name: firebase_storage - sha256: a27909491c25acef90acc932be4d87bafb9d33fb98678edd2f81eaec9568a109 + sha256: "50f0916a04e351ae549582e66bd33d9eb39c2ccb426e8e8c601a17471259d06f" url: "https://pub.dev" source: hosted - version: "11.1.0" + version: "11.1.1" firebase_storage_platform_interface: dependency: transitive description: name: firebase_storage_platform_interface - sha256: f254e064890df4ee588f10bea06d679e047018910451a4bc3c529b9791adb0a9 + sha256: "2711e985fd61242914dd1253b496286b03d292c2ff0f8863cc17ed14cf1bb3da" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "4.2.1" firebase_storage_web: dependency: transitive description: name: firebase_storage_web - sha256: b6d3c104fecafdce5fe1795306d33856c9a11fa76f73fe7eb062430fc151d686 + sha256: "16622540f424c871e71150140da6a02e9df60c9536e46d3243300f18c206cbc3" url: "https://pub.dev" source: hosted - version: "3.4.0" + version: "3.4.1" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_blurhash: + dependency: transitive + description: + name: flutter_blurhash + sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + sha256: "32cd900555219333326a2d0653aaaf8671264c29befa65bbd9856d204a4c9fb3" + url: "https://pub.dev" + source: hosted + version: "3.3.0" flutter_lints: dependency: "direct dev" description: @@ -194,10 +274,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: c224ac897bed083dabf11f238dd11a239809b446740be0c2044608c50029ffdf + sha256: "8ffe990dac54a4a5492747added38571a5ab474c8e5d196809ea08849c69b1bb" url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.13" flutter_test: dependency: "direct dev" description: flutter @@ -212,10 +292,10 @@ packages: dependency: transitive description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "0.13.6" http_parser: dependency: transitive description: @@ -224,22 +304,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + image: + dependency: "direct main" + description: + name: image + sha256: "73964e3609fb96e01e69b0924b939967c556e46c7ff05db2ea9e31019000f4ef" + url: "https://pub.dev" + source: hosted + version: "4.0.16" image_picker: dependency: "direct main" description: name: image_picker - sha256: "8b0efbf350ba4f2be1531d629396a994983d0c02f4a82a128aed84d954b90cfa" + sha256: "3da954c3b8906d82ecb50fd5e2b5401758f06d5678904eed6cbc06172283a263" url: "https://pub.dev" source: hosted - version: "0.8.7+2" + version: "0.8.7+4" image_picker_android: dependency: transitive description: name: image_picker_android - sha256: dfb5b0f28b8786fcc662b7ed42bfb4b82a6cbbd74da1958384b10d40bdf212a7 + sha256: "271e0448e82268b3fa1cb2a48e4a911cbc2135587123d7df8e7ca703c5b10da2" url: "https://pub.dev" source: hosted - version: "0.8.6+6" + version: "0.8.6+11" image_picker_for_web: dependency: transitive description: @@ -312,6 +400,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.0" + octo_image: + dependency: transitive + description: + name: octo_image + sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143" + url: "https://pub.dev" + source: hosted + version: "1.0.2" path: dependency: transitive description: @@ -320,6 +416,78 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.2" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: c7edf82217d4b2952b2129a61d3ad60f1075b9299e629e149a8d2e39c2e6aad4 + url: "https://pub.dev" + source: hosted + version: "2.0.14" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" + url: "https://pub.dev" + source: hosted + version: "2.0.27" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: ad4c4d011830462633f03eb34445a45345673dfd4faf1ab0b4735fbd93b19183 + url: "https://pub.dev" + source: hosted + version: "2.2.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1" + url: "https://pub.dev" + source: hosted + version: "2.1.10" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + url: "https://pub.dev" + source: hosted + version: "2.0.6" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6 + url: "https://pub.dev" + source: hosted + version: "2.1.6" + pedantic: + dependency: transitive + description: + name: pedantic + sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + url: "https://pub.dev" + source: hosted + version: "5.1.0" + platform: + dependency: transitive + description: + name: platform + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" + source: hosted + version: "3.1.0" plugin_platform_interface: dependency: transitive description: @@ -328,6 +496,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" + url: "https://pub.dev" + source: hosted + version: "3.7.3" + process: + dependency: transitive + description: + name: process + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" + source: hosted + version: "4.2.4" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + url: "https://pub.dev" + source: hosted + version: "0.27.7" sky_engine: dependency: transitive description: flutter @@ -341,6 +533,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + sqflite: + dependency: transitive + description: + name: sqflite + sha256: "8453780d1f703ead201a39673deb93decf85d543f359f750e2afc4908b55533f" + url: "https://pub.dev" + source: hosted + version: "2.2.8" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + sha256: e77abf6ff961d69dfef41daccbb66b51e9983cdd5cb35bf30733598057401555 + url: "https://pub.dev" + source: hosted + version: "2.4.5" stack_trace: dependency: transitive description: @@ -365,6 +573,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" + url: "https://pub.dev" + source: hosted + version: "3.1.0" term_glyph: dependency: transitive description: @@ -389,6 +605,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + uuid: + dependency: transitive + description: + name: uuid + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" + source: hosted + version: "3.0.7" vector_math: dependency: transitive description: @@ -397,6 +621,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + win32: + dependency: transitive + description: + name: win32 + sha256: dd8f9344bc305ae2923e3d11a2a911d9a4e2c7dd6fe0ed10626d63211a69676e + url: "https://pub.dev" + source: hosted + version: "4.1.3" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + xml: + dependency: transitive + description: + name: xml + sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + url: "https://pub.dev" + source: hosted + version: "6.2.2" sdks: - dart: ">=2.18.2 <3.0.0" + dart: ">=2.19.0 <3.0.0" flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml index b358a8e..a9576b0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -45,6 +45,8 @@ dependencies: firebase_storage: ^11.1.0 cloud_firestore: ^4.5.1 change_app_package_name: ^1.1.0 + cached_network_image: ^3.2.3 + image: ^4.0.16 dev_dependencies: diff --git a/web/favicon.png b/web/favicon.png deleted file mode 100644 index 8aaa46a..0000000 Binary files a/web/favicon.png and /dev/null differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png deleted file mode 100644 index b749bfe..0000000 Binary files a/web/icons/Icon-192.png and /dev/null differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48..0000000 Binary files a/web/icons/Icon-512.png and /dev/null differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png deleted file mode 100644 index eb9b4d7..0000000 Binary files a/web/icons/Icon-maskable-192.png and /dev/null differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png deleted file mode 100644 index d69c566..0000000 Binary files a/web/icons/Icon-maskable-512.png and /dev/null differ diff --git a/web/index.html b/web/index.html deleted file mode 100644 index e629c43..0000000 --- a/web/index.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - oggauer_gemeindetrommler - - - - - - - - - - diff --git a/web/manifest.json b/web/manifest.json deleted file mode 100644 index b18f432..0000000 --- a/web/manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "oggauer_gemeindetrommler", - "short_name": "oggauer_gemeindetrommler", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] -}