Skip to content

Commit

Permalink
chore: updated the UI of the speed dial and made some color changes i…
Browse files Browse the repository at this point in the history
…n the file (#1149)
  • Loading branch information
Jhalakupadhyay authored Jan 6, 2025
1 parent 87913a3 commit e3d1fdf
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 27 deletions.
8 changes: 4 additions & 4 deletions lib/view/draw_badge_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ class _DrawBadgeState extends State<DrawBadge> {
Icon(
Icons.edit,
color: drawToggle.getIsDrawing()
? Colors.red
? colorPrimary
: Colors.black,
),
Text(
'Draw',
style: TextStyle(
color: drawToggle.isDrawing
? Colors.red
? colorPrimary
: Colors.black,
),
)
Expand All @@ -117,14 +117,14 @@ class _DrawBadgeState extends State<DrawBadge> {
Icons.delete,
color: drawToggle.isDrawing
? Colors.black
: Colors.red,
: colorPrimary,
),
Text(
'Erase',
style: TextStyle(
color: drawToggle.isDrawing
? Colors.black
: Colors.red,
: colorPrimary,
),
)
],
Expand Down
5 changes: 2 additions & 3 deletions lib/view/homescreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,8 @@ class _HomeScreenState extends State<HomeScreen>
child: Container(
height: 150.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.r),
color: dividerColor,
),
borderRadius: BorderRadius.circular(10.r),
color: backCircleColor),
margin: EdgeInsets.symmetric(horizontal: 15.w),
padding: EdgeInsets.symmetric(
vertical: 10.h, horizontal: 10.w),
Expand Down
2 changes: 1 addition & 1 deletion lib/view/save_badge_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class _SaveBadgeScreenState extends State<SaveBadgeScreen> {
},
child: const Text(
'Import',
style: TextStyle(color: Colors.white),
style: TextStyle(color: drawerHeaderTitle),
))
],
body: Consumer<InlineImageProvider>(
Expand Down
5 changes: 3 additions & 2 deletions lib/view/settings_screen.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:badgemagic/constants.dart';
import 'package:badgemagic/view/widgets/common_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Expand Down Expand Up @@ -53,7 +54,7 @@ class SettingsScreenState extends State<SettingsScreen> {
child: DropdownButton<String>(
value: selectedLanguage,
isExpanded: true,
icon: Icon(Icons.arrow_drop_down, color: Colors.grey[700]),
icon: Icon(Icons.arrow_drop_down, color: mdGrey400),
onChanged: (String? newValue) {
setState(() {
selectedLanguage = newValue!;
Expand Down Expand Up @@ -86,7 +87,7 @@ class SettingsScreenState extends State<SettingsScreen> {
child: DropdownButton<String>(
value: selectedBadge,
isExpanded: true,
icon: Icon(Icons.arrow_drop_down, color: Colors.grey[700]),
icon: Icon(Icons.arrow_drop_down, color: mdGrey400),
onChanged: (String? newValue) {
setState(() {
selectedBadge = newValue!;
Expand Down
5 changes: 3 additions & 2 deletions lib/view/widgets/animation_container.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:badgemagic/badge_animation/animation_abstract.dart';
import 'package:badgemagic/constants.dart';
import 'package:badgemagic/providers/animation_badge_provider.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
Expand Down Expand Up @@ -44,8 +45,8 @@ class _AniContainerState extends State<AniContainer> {
child: Card(
surfaceTintColor: Colors.white,
color: animationCardState.isAnimationActive(badgeAnimation)
? Colors.red
: Colors.white,
? colorAccent
: drawerHeaderTitle,
elevation: 5,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
Expand Down
5 changes: 3 additions & 2 deletions lib/view/widgets/effects_container.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:badgemagic/bademagic_module/utils/converters.dart';
import 'package:badgemagic/badge_effect/badgeeffectabstract.dart';
import 'package:badgemagic/badge_effect/invert_led_effect.dart';
import 'package:badgemagic/constants.dart';
import 'package:badgemagic/providers/animation_badge_provider.dart';
import 'package:badgemagic/providers/imageprovider.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -53,8 +54,8 @@ class _EffectContainerState extends State<EffectContainer> {
child: Card(
surfaceTintColor: Colors.white,
color: effectCardState.isEffectActive(badgeEffect)
? Colors.red
: Colors.white,
? colorAccent
: drawerHeaderTitle,
elevation: 5,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
Expand Down
11 changes: 6 additions & 5 deletions lib/view/widgets/save_badge_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:badgemagic/bademagic_module/utils/byte_array_utils.dart';
import 'package:badgemagic/bademagic_module/utils/converters.dart';
import 'package:badgemagic/bademagic_module/utils/file_helper.dart';
import 'package:badgemagic/bademagic_module/utils/toast_utils.dart';
import 'package:badgemagic/constants.dart';
import 'package:badgemagic/providers/animation_badge_provider.dart';
import 'package:badgemagic/providers/badge_message_provider.dart';
import 'package:badgemagic/providers/saved_badge_provider.dart';
Expand Down Expand Up @@ -169,7 +170,7 @@ class SaveBadgeCard extends StatelessWidget {
padding: EdgeInsets.symmetric(
horizontal: 10.w, vertical: 4.h),
decoration: BoxDecoration(
color: Colors.red,
color: colorPrimary,
borderRadius: BorderRadius.circular(100),
),
child: Row(
Expand All @@ -195,7 +196,7 @@ class SaveBadgeCard extends StatelessWidget {
padding: EdgeInsets.symmetric(
horizontal: 12.w, vertical: 4.h),
decoration: BoxDecoration(
color: Colors.red,
color: colorPrimary,
borderRadius: BorderRadius.circular(100),
),
child: Row(
Expand All @@ -219,7 +220,7 @@ class SaveBadgeCard extends StatelessWidget {
padding: EdgeInsets.symmetric(
horizontal: 12.w, vertical: 4.h),
decoration: BoxDecoration(
color: Colors.red,
color: colorPrimary,
borderRadius: BorderRadius.circular(100),
),
child: Row(
Expand All @@ -242,7 +243,7 @@ class SaveBadgeCard extends StatelessWidget {
padding:
EdgeInsets.symmetric(horizontal: 12.w, vertical: 4.h),
decoration: BoxDecoration(
color: Colors.red,
color: colorPrimary,
borderRadius: BorderRadius.circular(100),
),
child: Row(
Expand Down Expand Up @@ -273,7 +274,7 @@ class SaveBadgeCard extends StatelessWidget {
padding:
EdgeInsets.symmetric(horizontal: 12.w, vertical: 4.h),
decoration: BoxDecoration(
color: Colors.red,
color: colorPrimary,
borderRadius: BorderRadius.circular(100),
),
child: Text(
Expand Down
16 changes: 8 additions & 8 deletions lib/view/widgets/speedial.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ class InnerDialPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
final center = Offset(size.width / 2, size.height / 2);
final radius = min(size.width / 2, size.height / 2) * 0.6;
final radius = min(size.width / 2, size.height / 2) * 0.7;

final paint = Paint()
..color = Colors.grey.shade300
..color = backCircleColor
..style = PaintingStyle.stroke
..strokeWidth = 1.w;
..strokeWidth = 10.w;

canvas.drawCircle(center, radius, paint);
}
Expand All @@ -40,13 +40,13 @@ class RadialDialPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
final center = Offset(size.width / 2, size.height / 2);
final radius = min(size.width / 2, size.height / 2) * 0.7;
final radius = min(size.width / 2, size.height / 2) * 0.8;

final paint = Paint()
..color = dividerColor
..color = backCircleColor
..style = PaintingStyle.stroke
..strokeCap = StrokeCap.square
..strokeWidth = 6.w;
..strokeWidth = 4.w;

const startAngle = 3 * pi / 4;

Expand Down Expand Up @@ -93,7 +93,7 @@ class InnerPointerPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
final center = Offset(size.width / 2, size.height / 2);
final radius = min(size.width / 2, size.height / 2) * 0.4;
final radius = min(size.width / 2, size.height / 2) * 0.5;

final pointerAngle = 3 * pi / 4 + 6 * pi / 4 * (value / max);
final pointerLength = radius + 15.w;
Expand Down Expand Up @@ -244,7 +244,7 @@ class _RadialDialState extends State<RadialDial> {
child: Text(
(outerValueProvider.getOuterValue()).toString(),
style: TextStyle(
fontSize: 40.sp,
fontSize: 50.sp,
fontWeight: FontWeight.w600,
color: const Color.fromRGBO(113, 113, 113, 1),
),
Expand Down

0 comments on commit e3d1fdf

Please sign in to comment.