Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor #163

Closed
wants to merge 2 commits into from
Closed

Refactor #163

wants to merge 2 commits into from

Conversation

a-mabe
Copy link
Owner

@a-mabe a-mabe commented Sep 1, 2024

No description provided.

@a-mabe a-mabe marked this pull request as ready for review September 1, 2024 19:45
@@ -88,187 +55,21 @@ class _MyHomePageState extends State<MyHomePage> {
///
late Future<List<Workout>> workouts;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using a provider to manage the list of workouts globally.

@@ -79,7 +46,7 @@ class MyHomePage extends StatefulWidget {

class _MyHomePageState extends State<MyHomePage> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider moving the home page component to a separate file for better readability.

import 'package:path_provider/path_provider.dart';
import 'package:share_plus/share_plus.dart';

class LocalFileUtil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job moving the I/O interaction to a util class!!

behavior: SnackBarBehavior.fixed,
duration: Duration(seconds: 4),
showCloseIcon: true,
const errorDeletingWorkoutSnackBar = SnackBar(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the method below instead of this?

if (Platform.isWindows || Platform.isLinux) {
logger.d("Platform is Windows or Linu, using FFI database factory");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Suggested change
logger.d("Platform is Windows or Linu, using FFI database factory");
logger.d("Platform is Windows or Linux, using FFI database factory");

@a-mabe a-mabe closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants