saving tips
parent
2f6ad8345e
commit
5901774fc7
|
@ -0,0 +1,3 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M22 12h-4l-3 9L9 3l-3 9H2"></path>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 213 B |
|
@ -6,6 +6,7 @@ import 'package:intl/intl.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:syncfusion_flutter_charts/charts.dart';
|
import 'package:syncfusion_flutter_charts/charts.dart';
|
||||||
import 'package:tests/preferences.dart';
|
import 'package:tests/preferences.dart';
|
||||||
|
import 'package:tests/saving_tips.dart';
|
||||||
import 'package:tests/theme/theme_constants.dart';
|
import 'package:tests/theme/theme_constants.dart';
|
||||||
import 'package:tests/theme/theme_manager.dart';
|
import 'package:tests/theme/theme_manager.dart';
|
||||||
import "package:easy_localization/easy_localization.dart";
|
import "package:easy_localization/easy_localization.dart";
|
||||||
|
@ -507,6 +508,20 @@ class AccountDetailPageState extends State<AccountDetailPage> with SingleTickerP
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
|
actions: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(right: 10.0),
|
||||||
|
child: IconButton(
|
||||||
|
icon: Icon(Icons.info,color: Colors.grey,),
|
||||||
|
onPressed: () {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) => SavingsTipsDialog(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
toolbarHeight: 80,
|
toolbarHeight: 80,
|
||||||
title: Text(
|
title: Text(
|
||||||
widget.account.name,
|
widget.account.name,
|
||||||
|
|
|
@ -0,0 +1,101 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:carousel_slider/carousel_slider.dart';
|
||||||
|
import 'package:flutter_neumorphic/flutter_neumorphic.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
|
||||||
|
class SavingsTipsDialog extends StatelessWidget {
|
||||||
|
final List<String> savingsTips = [
|
||||||
|
'Spare jeden Monat einen festen Betrag.',
|
||||||
|
'Vergleiche Preise, bevor du etwas kaufst.',
|
||||||
|
'Vermeide unnötige Ausgaben.',
|
||||||
|
'Setze dir konkrete Sparziele.',
|
||||||
|
'Überprüfe regelmäßig deine Ausgaben.',
|
||||||
|
'Verkaufe Dinge, die du nicht mehr brauchst.',
|
||||||
|
'Nutze Cashback-Programme beim Einkaufen.',
|
||||||
|
'Koche selbst anstatt auswärts zu essen.',
|
||||||
|
'Nutze kostenlose Angebote und Gutscheine.',
|
||||||
|
'Vermeide Impulskäufe und schlafe vor größeren Ausgaben eine Nacht darüber.',
|
||||||
|
'Fahre mit dem Fahrrad oder öffentlichen Verkehrsmitteln anstatt mit dem Auto.',
|
||||||
|
'Plane deine Mahlzeiten im Voraus, um Lebensmittelverschwendung zu vermeiden.',
|
||||||
|
'Vergleiche Versicherungen und Verträge, um Geld zu sparen.',
|
||||||
|
'Mache deine eigenen Reinigungsmittel statt teure Produkte zu kaufen.',
|
||||||
|
'Nutze kostenlose Online-Ressourcen für Weiterbildung und Hobbys.',
|
||||||
|
];
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Dialog(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(15.0),
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.all(25.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
CarouselSlider.builder(
|
||||||
|
itemCount: savingsTips.length,
|
||||||
|
itemBuilder: (BuildContext context, int index, int realIndex) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
|
child: Neumorphic(
|
||||||
|
style: NeumorphicStyle(
|
||||||
|
|
||||||
|
boxShape: NeumorphicBoxShape.roundRect(BorderRadius.circular(13.0)),
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
color: Colors.grey.shade100, // Setze die Hintergrundfarbe auf rot
|
||||||
|
),
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Column( mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
|
||||||
|
Text(
|
||||||
|
savingsTips[index],
|
||||||
|
style: TextStyle(fontSize: 18.0),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
options: CarouselOptions(
|
||||||
|
height: 250.0,
|
||||||
|
enlargeCenterPage: true,
|
||||||
|
viewportFraction: 0.85,
|
||||||
|
initialPage: 0,
|
||||||
|
enableInfiniteScroll: true,
|
||||||
|
autoPlay: true,
|
||||||
|
autoPlayInterval: Duration(seconds: 4),
|
||||||
|
autoPlayAnimationDuration: Duration(milliseconds: 700),
|
||||||
|
autoPlayCurve: Curves.fastOutSlowIn,
|
||||||
|
pauseAutoPlayOnTouch: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.0),
|
||||||
|
NeumorphicButton(
|
||||||
|
child: Text('Close'),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
style: NeumorphicStyle(
|
||||||
|
color: Colors.grey.shade100,
|
||||||
|
depth: 10,
|
||||||
|
intensity: 0.9,
|
||||||
|
shape: NeumorphicShape.flat,
|
||||||
|
boxShape: NeumorphicBoxShape.roundRect(BorderRadius.circular(15.0)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
66
pubspec.lock
66
pubspec.lock
|
@ -33,6 +33,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.1"
|
||||||
|
carousel_slider:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: carousel_slider
|
||||||
|
sha256: "9c695cc963bf1d04a47bd6021f68befce8970bcd61d24938e1fb0918cf5d9c42"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.2.1"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -147,6 +155,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.2.0"
|
version: "3.2.0"
|
||||||
|
flutter_svg:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_svg
|
||||||
|
sha256: f991fdb1533c3caeee0cdc14b04f50f0c3916f0dbcbc05237ccbe4e3c6b93f3f
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.5"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -245,6 +261,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.2"
|
version: "1.8.2"
|
||||||
|
path_parsing:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_parsing
|
||||||
|
sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.1"
|
||||||
path_provider_linux:
|
path_provider_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -269,6 +293,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.7"
|
version: "2.1.7"
|
||||||
|
petitparser:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: petitparser
|
||||||
|
sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.1.0"
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -442,6 +474,30 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.2"
|
version: "1.3.2"
|
||||||
|
vector_graphics:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vector_graphics
|
||||||
|
sha256: ea8d3fc7b2e0f35de38a7465063ecfcf03d8217f7962aa2a6717132cb5d43a79
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.5"
|
||||||
|
vector_graphics_codec:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vector_graphics_codec
|
||||||
|
sha256: a5eaa5d19e123ad4f61c3718ca1ed921c4e6254238d9145f82aa214955d9aced
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.5"
|
||||||
|
vector_graphics_compiler:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vector_graphics_compiler
|
||||||
|
sha256: "15edc42f7eaa478ce854eaf1fbb9062a899c0e4e56e775dd73b7f4709c97c4ca"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.5"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -466,6 +522,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
|
xml:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: xml
|
||||||
|
sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.2.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.19.6 <3.0.0"
|
dart: ">=2.19.6 <3.0.0"
|
||||||
flutter: ">=3.3.0"
|
flutter: ">=3.7.0-0"
|
||||||
|
|
|
@ -40,6 +40,9 @@ dependencies:
|
||||||
flutter_neumorphic: ^3.2.0
|
flutter_neumorphic: ^3.2.0
|
||||||
awesome_dialog: ^3.1.0
|
awesome_dialog: ^3.1.0
|
||||||
easy_localization: ^3.0.2
|
easy_localization: ^3.0.2
|
||||||
|
carousel_slider: ^4.2.1
|
||||||
|
flutter_svg: ^2.0.0
|
||||||
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
@ -65,6 +68,7 @@ flutter:
|
||||||
|
|
||||||
assets:
|
assets:
|
||||||
- lib/assets/translations/
|
- lib/assets/translations/
|
||||||
|
- lib/assets/savings_icon.svg
|
||||||
|
|
||||||
fonts:
|
fonts:
|
||||||
- family: Montserrat
|
- family: Montserrat
|
||||||
|
|
Loading…
Reference in New Issue