Skip to content

Commit

Permalink
Updating to 9.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MezoPeeta committed Feb 11, 2024
1 parent 1eceff5 commit c6ee79c
Show file tree
Hide file tree
Showing 38 changed files with 1,197 additions and 874 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
## Livine
A health-check and food planner app, runs on android and windows platform

Livine isn't available in Israel and it will show a banned message

# Here are android screenshots

![Livine home page](screenshots/export_1.jpg)

![Livine home page](screenshots/export_2.jpg)

## Download
### [Download for Android](https://github.com/Livine-Project/livine/releases/latest)



> Livine isn't available in Israel and it will show a banned message

4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart' as riverpod;
import 'package:shared_preferences/shared_preferences.dart';
import 'package:window_manager/window_manager.dart';

import 'package:feedback/feedback.dart';
import 'src/constants/constants.dart';
import 'src/features/contextmenu/domain/get_args.dart';
import 'src/shared/cache/cache_helper.dart';
Expand Down Expand Up @@ -84,7 +84,7 @@ Future<void> main(List<String> args) async {
tools: [
...DevicePreview.defaultTools,
],
builder: (context) => const MyApp(),
builder: (context) => BetterFeedback(child: const MyApp()),
),
),
),
Expand Down
3 changes: 0 additions & 3 deletions lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import 'routing/routes.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'shared/styles/lib_color_schemes.g.dart';
import 'translations/domain/translation_provider.dart';
import 'package:device_preview/device_preview.dart';

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
Expand Down Expand Up @@ -59,13 +58,11 @@ class MaterialAppWithTheme extends ConsumerWidget {
),
themeMode: theme.themeMode,
theme: ThemeData(
fontFamily: 'Kine',
useMaterial3: true,
colorSchemeSeed:
isDynamic ? lightDynamic?.primary ?? themeSeed : themeSeed,
),
darkTheme: ThemeData(
fontFamily: 'Kine',
useMaterial3: true,
colorSchemeSeed:
isDynamic ? darkDynamic?.primary ?? themeSeed : themeSeed,
Expand Down
137 changes: 25 additions & 112 deletions lib/src/common_widgets/auth/auth_widget.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:livine/src/common_widgets/text_with_font.dart';

// class CustomButton extends StatelessWidget {
// const CustomButton({super.key});
//
// final void Function() onPressed;
// final bool isLoading;
// final String text;
// final Color? color,textColor;
// final double width = 350;
// final Widget? icon;
// @override
// Widget build(BuildContext context) {
// return const Placeholder();
// }
// }

Widget CustomButton({
required void Function() onPressed,
required bool isLoading,
required String text,
Color? color,
Color? textColor,
double width = 350,
Widget? icon,
bool isLoading = false,
required BuildContext context,
}) {
final theme = Theme.of(context).colorScheme;
Expand All @@ -23,22 +38,23 @@ Widget CustomButton({
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15),
),
child: isLoading
? const CircularProgressIndicator(
color: Colors.white,
)
: Row(
child: icon != null
? Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
text,
style: TextStyle(
fontSize: 15,
fontFamily: 'Kine',
color: textColor ?? theme.onPrimaryContainer),
),
icon ?? const SizedBox(),
icon
],
),
)
: isLoading
? CircularProgressIndicator()
: TextWithFont(text: text),
),
);
}
Expand Down Expand Up @@ -75,106 +91,3 @@ Widget authFormField({
labelStyle: const TextStyle(fontSize: 15),
),
);

class AuthSecondaryButton extends StatelessWidget {
const AuthSecondaryButton(
{Key? key,
required this.text,
required this.goTo,
this.color,
this.textAlign})
: super(key: key);
final String text;
final String goTo;
final Color? color;
final TextAlign? textAlign;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context).colorScheme;
return GestureDetector(
onTap: () => context.push(goTo),
child: Text(
text,
textAlign: textAlign ?? TextAlign.left,
style: TextStyle(
fontSize: 15.0,
color: color ?? theme.primary,
fontFamily: 'Kine',
fontWeight: FontWeight.bold,
),
),
);
}
}

class TextwithTextButton extends StatelessWidget {
const TextwithTextButton({
Key? key,
required this.firstText,
required this.goTo,
required this.secondText,
}) : super(key: key);
final String firstText, secondText, goTo;

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(top: 30),
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
firstText,
style: const TextStyle(
fontFamily: 'Kine', fontWeight: FontWeight.w100),
),
AuthSecondaryButton(
goTo: goTo,
text: secondText,
),
],
),
),
);
}
}

Widget authForm({
required Key? formKey,
required BuildContext context,
required TextEditingController username,
required TextEditingController password,
required void Function(void Function()) setState,
required String? Function(String?) userValidator,
required String? Function(String?) passwordValidator,
required String usernameText,
required String passwordText,
required bool obscureText,
bool isLogin = true,
}) =>
Form(
key: formKey,
child: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(0, 20, 0, 20),
child: authFormField(
context: context,
controller: username,
text: usernameText,
setState: setState,
validator: userValidator,
obscureText: false,
)),
authFormField(
context: context,
obscureText: obscureText,
isPassword: true,
controller: password,
validator: passwordValidator,
setState: setState,
text: passwordText),
],
),
);
46 changes: 46 additions & 0 deletions lib/src/common_widgets/confetti_dialog/confetti_dialog.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import 'dart:math';

import 'package:flutter/material.dart';
import 'package:confetti/confetti.dart';
import 'package:livine/src/utils/hooks/confetti_controller.dart';

Future<T?> showConfettiDialog<T>({
required BuildContext context,
WidgetBuilder? builder,
bool barrierDismissible = true,
Color? barrierColor,
bool useSafeArea = true,
bool useRootNavigator = true,
RouteSettings? routeSettings,
Alignment confettiAlignment = Alignment.topCenter,
}) {
final pageBuilder = Builder(
builder: builder!,
);
print("MW");
final _confettiController =
ConfettiController(duration: Duration(seconds: 5));
_confettiController.play();
return showDialog(
context: context,
builder: (BuildContext buildContext) {
return Stack(
children: [
pageBuilder,
Align(
alignment: confettiAlignment,
child: ConfettiWidget(
confettiController: _confettiController,
emissionFrequency: 0.1,
blastDirection: pi / 2),
),
],
);
},
barrierDismissible: barrierDismissible,
barrierColor: barrierColor,
useSafeArea: useSafeArea,
useRootNavigator: useRootNavigator,
routeSettings: routeSettings,
);
}
49 changes: 49 additions & 0 deletions lib/src/common_widgets/recipe/recipe_user_card.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';

class RecipeUserCard extends StatelessWidget {
const RecipeUserCard({
super.key,
required this.imageURL,
required this.name,
required this.onTap
});

final String imageURL, name;
final void Function()? onTap;

@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Card(
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: Column(
children: [
ClipRRect(
borderRadius: const BorderRadius.vertical(
top: Radius.circular(10.0), bottom: Radius.circular(10.0)),
child: CachedNetworkImage(
imageUrl: imageURL,
height: 140,
errorWidget: (context, url, error) =>
const Icon(Icons.broken_image_outlined),
width: MediaQuery.of(context).size.width,
fit: BoxFit.cover,
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
name,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontFamily: 'Kine', fontSize: 20.0),
),
),
],
),
),
);
}
}
11 changes: 11 additions & 0 deletions lib/src/common_widgets/text_with_font.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'package:flutter/material.dart';

class TextWithFont extends StatelessWidget {
const TextWithFont({super.key,required this.text, this.fontSize});
final String text;
final double? fontSize;
@override
Widget build(BuildContext context) {
return Text(text,style: TextStyle(fontSize: fontSize,fontFamily: 'Kine'),);
}
}
1 change: 0 additions & 1 deletion lib/src/constants/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ ResponsiveHelper rh = ResponsiveHelper();

final notificationControl = NotificationControl();


const restAPIURL = "https://livine2.pythonanywhere.com/api";

const restAPIMedia = "https://livine2.pythonanywhere.com";
Expand Down
Loading

0 comments on commit c6ee79c

Please sign in to comment.