Skip to content

Commit 3dcf64c

Browse files
authored
Merge pull request #15 from CodandoTV/start_reading
Start Reading feature
2 parents 79371b6 + 1735bd3 commit 3dcf64c

46 files changed

Lines changed: 1777 additions & 262 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ app.*.symbols
167167
/lib/main.config.dart
168168
*.freezed.dart
169169
*.g.dart
170-
*/di.config.dart
170+
*.config.dart
171171
*.mocks.dart
172172
lib/core/di/di.config.dart
173+
*.gr.dart
174+

ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>12.0</string>
24+
<string>13.0</string>
2525
</dict>
2626
</plist>

ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '12.0'
2+
# platform :ios, '13.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ EXTERNAL SOURCES:
2727
:path: ".symlinks/plugins/sqflite_darwin/darwin"
2828

2929
SPEC CHECKSUMS:
30-
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
30+
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
3131
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
3232
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
3333
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
3434

35-
PODFILE CHECKSUM: 4305caec6b40dde0ae97be1573c53de1882a07e5
35+
PODFILE CHECKSUM: 3c63482e143d1b91d2d2560aee9fb04ecc74ac7e
3636

3737
COCOAPODS: 1.15.2

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@
455455
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
456456
GCC_WARN_UNUSED_FUNCTION = YES;
457457
GCC_WARN_UNUSED_VARIABLE = YES;
458-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
458+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
459459
MTL_ENABLE_DEBUG_INFO = NO;
460460
SDKROOT = iphoneos;
461461
SUPPORTED_PLATFORMS = iphoneos;
@@ -585,7 +585,7 @@
585585
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
586586
GCC_WARN_UNUSED_FUNCTION = YES;
587587
GCC_WARN_UNUSED_VARIABLE = YES;
588-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
588+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
589589
MTL_ENABLE_DEBUG_INFO = YES;
590590
ONLY_ACTIVE_ARCH = YES;
591591
SDKROOT = iphoneos;
@@ -636,7 +636,7 @@
636636
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
637637
GCC_WARN_UNUSED_FUNCTION = YES;
638638
GCC_WARN_UNUSED_VARIABLE = YES;
639-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
639+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
640640
MTL_ENABLE_DEBUG_INFO = NO;
641641
SDKROOT = iphoneos;
642642
SUPPORTED_PLATFORMS = iphoneos;

lib/core/designsystem/atoms/colors.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ const primary = Color(0xFF1338BE);
44
const disabled = Color(0xFF565656);
55
const onBorder = Color(0xFF0D5EAF);
66
const onBackground = Color(0xFFC6E0FA);
7+
const background = Color(0xFF3D67FF);
8+
const error = Color.fromARGB(255, 196, 8, 8);
9+
const primaryText = Color(0xFF110000);

lib/core/designsystem/molecules/buttons/primary_button.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import 'package:mibook/core/designsystem/atoms/colors.dart';
44
class PrimaryButton extends StatelessWidget {
55
final String title;
66
final bool isEnabled;
7+
final bool isExpanded;
78
final bool isLoading;
89
final VoidCallback onPressed;
910

1011
const PrimaryButton({
1112
super.key,
1213
required this.title,
1314
this.isEnabled = true,
15+
this.isExpanded = false,
1416
this.isLoading = false,
1517
required this.onPressed,
1618
});
@@ -19,6 +21,7 @@ class PrimaryButton extends StatelessWidget {
1921
Widget build(BuildContext context) {
2022
return SizedBox(
2123
height: 48,
24+
width: isExpanded ? double.infinity : null,
2225
child: ElevatedButton(
2326
onPressed: isEnabled ? onPressed : null,
2427
style: ElevatedButton.styleFrom(
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:mibook/core/designsystem/atoms/colors.dart';
3+
4+
class SecondaryButton extends StatelessWidget {
5+
final String title;
6+
final bool isEnabled;
7+
final bool isExpanded;
8+
final bool isLoading;
9+
final VoidCallback onPressed;
10+
11+
const SecondaryButton({
12+
super.key,
13+
required this.title,
14+
this.isEnabled = true,
15+
this.isExpanded = false,
16+
this.isLoading = false,
17+
required this.onPressed,
18+
});
19+
20+
@override
21+
Widget build(BuildContext context) {
22+
return SizedBox(
23+
height: 48,
24+
width: isExpanded ? double.infinity : null,
25+
child: OutlinedButton(
26+
onPressed: isEnabled ? onPressed : null,
27+
style: OutlinedButton.styleFrom(
28+
side: BorderSide(
29+
color: isEnabled ? primary : disabled,
30+
width: 1.0,
31+
),
32+
foregroundColor: isEnabled ? primary : disabled,
33+
padding: const EdgeInsets.symmetric(
34+
horizontal: 16,
35+
vertical: 12,
36+
),
37+
textStyle: const TextStyle(
38+
fontSize: 16,
39+
fontWeight: FontWeight.w500,
40+
),
41+
shape: RoundedRectangleBorder(
42+
borderRadius: BorderRadius.circular(16),
43+
),
44+
minimumSize: const Size(80, 48),
45+
),
46+
child: isLoading
47+
? SizedBox(
48+
width: 20,
49+
height: 20,
50+
child: CircularProgressIndicator(
51+
color: Colors.white,
52+
),
53+
)
54+
: Text(title),
55+
),
56+
);
57+
}
58+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:mibook/core/designsystem/atoms/colors.dart';
3+
4+
class ProgressStepper extends StatelessWidget {
5+
final double progress;
6+
7+
const ProgressStepper({super.key, required this.progress});
8+
9+
@override
10+
Widget build(BuildContext context) {
11+
return Column(
12+
crossAxisAlignment: CrossAxisAlignment.start,
13+
children: [
14+
Text('Progress: ${(progress * 100).toStringAsFixed(1)}%'),
15+
const SizedBox(height: 8),
16+
LinearProgressIndicator(
17+
value: progress,
18+
minHeight: 8,
19+
backgroundColor: Colors.grey[300],
20+
valueColor: AlwaysStoppedAnimation<Color>(background),
21+
),
22+
],
23+
);
24+
}
25+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:mibook/core/designsystem/atoms/colors.dart';
3+
4+
class RadioBox extends StatelessWidget {
5+
final bool value;
6+
final ValueChanged<bool?> onChanged;
7+
final String label;
8+
9+
const RadioBox({
10+
super.key,
11+
required this.value,
12+
required this.onChanged,
13+
required this.label,
14+
});
15+
16+
@override
17+
Widget build(BuildContext context) {
18+
return InkWell(
19+
onTap: () => onChanged(!value),
20+
child: Row(
21+
children: [
22+
Checkbox(
23+
fillColor: WidgetStateProperty.all(primary),
24+
value: value,
25+
onChanged: onChanged,
26+
),
27+
Text(label),
28+
],
29+
),
30+
);
31+
}
32+
}

0 commit comments

Comments
 (0)