-
Notifications
You must be signed in to change notification settings - Fork 0
Start Reading feature #15
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
396f258
[feat](pnalvarez): implemented ReadingDataSource
pnalvarez 54d2426
[feat](pnalvarez): implemented ReadingRepository
pnalvarez 5403a15
[feat](pnalvarez): displaying start reading dialog
pnalvarez 811ada6
[feat](pnalvarez): showing progress input field
pnalvarez 9a980dd
[feat](pnalvarez): start reading page
pnalvarez ea8f4d7
[feat](pnalvarez): removed radio box and finishing book
pnalvarez 6293afd
[test](pnalvarez): start reading feature unit tests
pnalvarez 821911b
[refactor](pnalvarez): addressed Github warnings
pnalvarez 69d9d68
removed auto generated file
pnalvarez 3cb301a
[feat](pnalvarez): ignoring gr.dart files
pnalvarez 6acdf74
[feat](pnalvarez): ignoring g.dart files
pnalvarez 5540c2f
[feat](pnalvarez): delete freezed files from git control
pnalvarez 0627ae1
[refactor](pnalvarez): secondary button
pnalvarez 5be5c24
[fix](pnalvarez): removed unused imports and variables
pnalvarez d5cfbbf
[fix](pnalvarez): removed di.config.dart file and app module
pnalvarez cabc81e
[fix](pnalvarez): filtering only books that contain pagecount property
pnalvarez 1735bd3
[fix](pnalvarez): removed unused import
pnalvarez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
lib/core/designsystem/molecules/buttons/secondary_button.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:mibook/core/designsystem/atoms/colors.dart'; | ||
|
|
||
| class SecondaryButton extends StatelessWidget { | ||
| final String title; | ||
| final bool isEnabled; | ||
| final bool isExpanded; | ||
| final bool isLoading; | ||
| final VoidCallback onPressed; | ||
|
|
||
| const SecondaryButton({ | ||
| super.key, | ||
| required this.title, | ||
| this.isEnabled = true, | ||
| this.isExpanded = false, | ||
| this.isLoading = false, | ||
| required this.onPressed, | ||
| }); | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) { | ||
| return SizedBox( | ||
| height: 48, | ||
| width: isExpanded ? double.infinity : null, | ||
| child: OutlinedButton( | ||
| onPressed: isEnabled ? onPressed : null, | ||
| style: OutlinedButton.styleFrom( | ||
| side: BorderSide( | ||
| color: isEnabled ? primary : disabled, | ||
| width: 1.0, | ||
| ), | ||
| foregroundColor: isEnabled ? primary : disabled, | ||
| padding: const EdgeInsets.symmetric( | ||
| horizontal: 16, | ||
| vertical: 12, | ||
| ), | ||
| textStyle: const TextStyle( | ||
| fontSize: 16, | ||
| fontWeight: FontWeight.w500, | ||
| ), | ||
| shape: RoundedRectangleBorder( | ||
| borderRadius: BorderRadius.circular(16), | ||
| ), | ||
| minimumSize: const Size(80, 48), | ||
| ), | ||
| child: isLoading | ||
| ? SizedBox( | ||
| width: 20, | ||
| height: 20, | ||
| child: CircularProgressIndicator( | ||
| color: Colors.white, | ||
| ), | ||
| ) | ||
| : Text(title), | ||
| ), | ||
| ); | ||
| } | ||
| } |
25 changes: 25 additions & 0 deletions
25
lib/core/designsystem/molecules/indicators/progress_stepper.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:mibook/core/designsystem/atoms/colors.dart'; | ||
|
|
||
| class ProgressStepper extends StatelessWidget { | ||
| final double progress; | ||
|
|
||
| const ProgressStepper({super.key, required this.progress}); | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) { | ||
| return Column( | ||
| crossAxisAlignment: CrossAxisAlignment.start, | ||
| children: [ | ||
| Text('Progress: ${(progress * 100).toStringAsFixed(1)}%'), | ||
| const SizedBox(height: 8), | ||
| LinearProgressIndicator( | ||
| value: progress, | ||
| minHeight: 8, | ||
| backgroundColor: Colors.grey[300], | ||
| valueColor: AlwaysStoppedAnimation<Color>(background), | ||
| ), | ||
| ], | ||
| ); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:mibook/core/designsystem/atoms/colors.dart'; | ||
|
|
||
| class RadioBox extends StatelessWidget { | ||
| final bool value; | ||
| final ValueChanged<bool?> onChanged; | ||
| final String label; | ||
|
|
||
| const RadioBox({ | ||
| super.key, | ||
| required this.value, | ||
| required this.onChanged, | ||
| required this.label, | ||
| }); | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) { | ||
| return InkWell( | ||
| onTap: () => onChanged(!value), | ||
| child: Row( | ||
| children: [ | ||
| Checkbox( | ||
| fillColor: WidgetStateProperty.all(primary), | ||
| value: value, | ||
| onChanged: onChanged, | ||
| ), | ||
| Text(label), | ||
| ], | ||
| ), | ||
| ); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.