-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
@@ -88,187 +55,21 @@ class _MyHomePageState extends State<MyHomePage> { | |||
/// | |||
late Future<List<Workout>> workouts; |
There was a problem hiding this comment.
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> { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
logger.d("Platform is Windows or Linu, using FFI database factory"); | |
logger.d("Platform is Windows or Linux, using FFI database factory"); |
No description provided.