Skip to content

Commit

Permalink
enhancement: corrected the UI overflow in the animation and effects t…
Browse files Browse the repository at this point in the history
…ab also increased the gesture radius of the speed dial for better user experience.
  • Loading branch information
Jhalakupadhyay committed Jun 17, 2024
1 parent 5906532 commit f7a7e26
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
2 changes: 2 additions & 0 deletions iOS/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>This app needs Bluetooth to function</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
Expand Down
20 changes: 10 additions & 10 deletions lib/bademagic_module/utils/data_to_bytearray_converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,17 @@ String getTime(DateTime now) {
return ans;
}

//Function to get messages
//takes the list of hexstrings generated by the message to hex function
//and converts them to a single string
//ignoring the [] due to the list object using regexp
//and returns a single string
String getMessage(Data data) {
String msg = data.messages
.map((e) => e.text)
.join(' ')
.split("")
.where((element) => charCodes.containsKey(element))
.map((e) => charCodes[e])
.join();
logger.d("get message = $msg");
return msg;
String ans = data.messages
.map(
(message) => message.text.join('').replaceAll(RegExp(r'^\[|\]$'), ''))
.join('');
logger.d("Get message = $ans");
return ans;
}

//filling he rest length with the 0
Expand Down
6 changes: 3 additions & 3 deletions lib/view/widgets/animation_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class _AniContainerState extends State<AniContainer> {
double width = MediaQuery.of(context).size.width;
return Container(
margin: const EdgeInsets.all(5),
height: height * 0.15,
height: height * 0.09,
width: width * 0.307,
child: GestureDetector(
onTap: () {
Expand All @@ -37,12 +37,12 @@ class _AniContainerState extends State<AniContainer> {
color: animationcardstate.getAnimationIndex() == widget.index
? Colors.red
: Colors.white,
elevation: 10,
elevation: 5,
child: Column(
children: [
Image(
image: AssetImage(widget.animation),
height: height * 0.1,
height: height * 0.04,
),
Text(widget.aniName),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/view/widgets/effects_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class _EffectContainerState extends State<EffectContainer> {
color: effectcardstate.getEffectIndex(widget.index) == 1
? Colors.red
: Colors.white,
elevation: 10,
elevation: 5,
child: Column(
children: [
Image(
Expand Down
6 changes: 3 additions & 3 deletions lib/view/widgets/speedial.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,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.8;
final radius = min(size.width / 2, size.height / 2) * 0.4;

final pointerAngle = 3 * pi / 4 + 6 * pi / 4 * (value / max);
final pointerLength = radius + 25;
Expand Down Expand Up @@ -232,8 +232,8 @@ class _RadialDialState extends State<RadialDial> {
max: maxValue,
color: Colors.red),
child: const SizedBox(
width: 80,
height: 80,
width: 180,
height: 180,
),
),
),
Expand Down

0 comments on commit f7a7e26

Please sign in to comment.