From bcdb92caa86311762e9c71e558b41146e249f30a Mon Sep 17 00:00:00 2001 From: Jhalakupadhyay Date: Thu, 8 Aug 2024 23:33:36 +0530 Subject: [PATCH 1/6] feat: Added the logic to display the clipart and text on the virtual badge. feat: Added the modes support for left right top down fixed and animation support for flash and marquee. animation right --- assets/icons/postman collections.zip | Bin 34525 -> 0 bytes lib/bademagic_module/utils/converters.dart | 19 +++++++++++++++---- lib/bademagic_module/utils/image_utils.dart | 1 - lib/view/homescreen.dart | 9 +++++++++ 4 files changed, 24 insertions(+), 5 deletions(-) delete mode 100644 assets/icons/postman collections.zip diff --git a/assets/icons/postman collections.zip b/assets/icons/postman collections.zip deleted file mode 100644 index 99260808ee28579360a4cfc60aaade417c64927a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34525 zcma&OWl&sA8#XwE0Kql5yA#|kxVyW%4epQx2=4Cg?oNQg-Q5We8Qj_My!P!@?be@^Ij;`X`MLQ)$xJ2%1%+>wsT?>$4gbvfSY?<2M8t$8u7!nfPI!Ad!U-UU z22fB?aSr#n4pUea6}KOp_?B$?J-V2*PHv1ZjyMSVKDu13-}Md&pS#P16yn{cnv}0y zT`^dzHm+LV=(nihsof+=Kv!#U@1}CLq)*=GgyTbITh|m}JfO;fo|a{5WsButddUtOu{yn^sB|9sC}z zcUik6O}T1b;iq;+brZZ0=*NKuwBv)qlA1~lG_Jv2cHRO!}K(l#1_5cBc`0wm6GZ2)dbsH&XyubLp*$79Sau(XrSkb z6XzrKYqovUP*f0H>yfVD^G{t({Dc zp#F;+dSDp-YJ>q-mI>GE>UgTX=~0_qLBggz3okNt#Keh;q2e#PW}GlLeDN%kk9A<% zkHO_QkeMj;2z_Ql+D?|O;@J9gzt)IH#DrW!kcwZ%P$i*|;E_a^wJ+N(*fxsID(@9QV#*WZ+zlERy=( zGdh~4&y$soHzS(iv|BD(LWGbGh_2snCtYGuV~F++VHlUjnp8SgDS-wNbMsZov1iXS zpS90%tLK3Ijt%?D-{K)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Gvwt*Gii@rLwlxB_;zty276rjoPmFadmiW^{LHv-p--edM zf6HkQq7Qf81##y;%^^j;m_5EP&eN>qfBZ8Pje3CCBcMeRIN)M;D%GOpA*gZHqQ^Yp z>2MRM%WNM~ax%`H39GWOpXe@DBq*naw-<6+$Ph$Adm3Tas+viDbsXke<<ADWvh%mB;$+-*4bk%a8tafDoRUjiCcc0V2hV>QRl4c zGp{+9wdjdtX#@xNyLhYvtM zv;W)a{wdt?FSGxhbjLq%{+HQY|8JcCRLJ9hH~imGIsavNmh`_j{Qn|${>y`ZNA3KV y2b=#H;Qwc$=f7O~_l>3hvS3&HKXU2+XPc>lG$`0V=KO~k_AU?rz)8?Q-u(}gu1fO& diff --git a/lib/bademagic_module/utils/converters.dart b/lib/bademagic_module/utils/converters.dart index 75fe40d8d..a28562d35 100644 --- a/lib/bademagic_module/utils/converters.dart +++ b/lib/bademagic_module/utils/converters.dart @@ -3,7 +3,10 @@ import 'package:badgemagic/bademagic_module/utils/byte_array_utils.dart'; import 'package:badgemagic/bademagic_module/utils/data_to_bytearray_converter.dart'; import 'package:badgemagic/bademagic_module/utils/file_helper.dart'; import 'package:badgemagic/bademagic_module/utils/image_utils.dart'; +import 'package:badgemagic/providers/cardsprovider.dart'; +import 'package:badgemagic/providers/badgeview_provider.dart'; import 'package:badgemagic/providers/imageprovider.dart'; +import 'package:badgemagic/view/draw_badge_screen.dart'; import 'package:get_it/get_it.dart'; class Converters { @@ -12,8 +15,10 @@ class Converters { DataToByteArrayConverter converter = DataToByteArrayConverter(); ImageUtils imageUtils = ImageUtils(); FileHelper fileHelper = FileHelper(); + DrawBadgeProvider badgeList = GetIt.instance.get(); int controllerLength = 0; + bool isEmpty = false; Future> messageTohex(String message) async { List hexStrings = []; @@ -23,10 +28,8 @@ class Converters { var key = controllerData.imageCache.keys.toList()[index]; if (key is List) { String filename = key[0]; - logger.d("Filename: $filename"); List>? image = await fileHelper.readFromFile(filename); - logger.d("Image: $image"); - hexStrings = convertBitmapToLEDHex(image!, true); + hexStrings += convertBitmapToLEDHex(image!, true); x += 5; } else { List hs = @@ -40,6 +43,15 @@ class Converters { } } } + if (message.isEmpty) { + badgeList.resetGrid(); + isEmpty = true; + } else { + isEmpty = false; + List byteArray = hexStringToByteArray(hexStrings.join()); + // List> binaryArray = byteArrayToBinaryArray(byteArray); + badgeList.startAnimation(); + } return hexStrings; } @@ -145,7 +157,6 @@ class Converters { allHexs.add(lineHex.toString()); // Store completed hexadecimal line } - logger.d("All hexs: $allHexs"); return allHexs; // Return list of hexadecimal strings } } diff --git a/lib/bademagic_module/utils/image_utils.dart b/lib/bademagic_module/utils/image_utils.dart index 62107bb14..1c8804c4e 100644 --- a/lib/bademagic_module/utils/image_utils.dart +++ b/lib/bademagic_module/utils/image_utils.dart @@ -222,7 +222,6 @@ class ImageUtils { } } } - logger.d("Pixel Array generated = $pixelArray"); return Converters.convertBitmapToLEDHex(pixelArray, false); } } diff --git a/lib/view/homescreen.dart b/lib/view/homescreen.dart index 5d6a0739c..36385ecd2 100644 --- a/lib/view/homescreen.dart +++ b/lib/view/homescreen.dart @@ -1,3 +1,4 @@ +import 'package:badgemagic/bademagic_module/utils/byte_array_utils.dart'; import 'package:badgemagic/bademagic_module/utils/converters.dart'; import 'package:badgemagic/bademagic_module/utils/image_utils.dart'; import 'package:badgemagic/constants.dart'; @@ -34,6 +35,7 @@ class _HomeScreenState extends State with TickerProviderStateMixin { Converters converters = Converters(); DrawBadgeProvider drawBadgeProvider = GetIt.instance(); bool isPrefixIconClicked = false; + int textfieldLength = 0; @override void initState() { @@ -47,6 +49,13 @@ class _HomeScreenState extends State with TickerProviderStateMixin { _tabController = TabController(length: 3, vsync: this); } + void _controllerListner() { + logger + .d('Controller Listener : ${inlineImageProvider.getController().text}'); + converters.messageTohex(inlineImageProvider.getController().text); + inlineImageProvider.controllerListener(); + } + @override void dispose() { _tabController.dispose(); From 85da751843a6a06d18be518cb19cb45a9b3e2f5f Mon Sep 17 00:00:00 2001 From: Jhalakupadhyay Date: Sat, 7 Sep 2024 18:57:01 +0530 Subject: [PATCH 2/6] feat:Added the base structure for the animations with speed controll. --- .../utils/byte_array_utils.dart | 53 +++++ lib/bademagic_module/utils/converters.dart | 22 +- lib/bademagic_module/utils/image_utils.dart | 1 - lib/badge_animation/animation_abstract.dart | 15 ++ lib/constants.dart | 12 ++ lib/main.dart | 2 +- lib/providers/badgeview_provider.dart | 203 ++++++++++++++++++ lib/providers/drawbadge_provider.dart | 34 --- lib/providers/getitlocator.dart | 2 +- lib/view/draw_badge_screen.dart | 2 +- lib/view/homescreen.dart | 15 +- lib/virtualbadge/view/badge_home_view.dart | 7 +- lib/virtualbadge/view/draw_badge.dart | 8 +- lib/virtualbadge/widgets/badge_widget.dart | 8 +- pubspec.lock | 32 +-- pubspec.yaml | 2 +- 16 files changed, 341 insertions(+), 77 deletions(-) create mode 100644 lib/badge_animation/animation_abstract.dart create mode 100644 lib/providers/badgeview_provider.dart delete mode 100644 lib/providers/drawbadge_provider.dart diff --git a/lib/bademagic_module/utils/byte_array_utils.dart b/lib/bademagic_module/utils/byte_array_utils.dart index 287b7154f..015694c5b 100644 --- a/lib/bademagic_module/utils/byte_array_utils.dart +++ b/lib/bademagic_module/utils/byte_array_utils.dart @@ -28,3 +28,56 @@ List hexStringToByteArray(String hexString) { logger.d(data.length); return data; } + +List> byteArrayToBinaryArray(List byteArray) { + List> binaryArray = List.generate(11, (_) => []); + + int rowIndex = 0; + for (int byte in byteArray) { + List binaryRepresentation = []; + for (int i = 7; i >= 0; i--) { + binaryRepresentation.add((byte >> i) & 1); + } + + binaryArray[rowIndex].addAll(binaryRepresentation); + + rowIndex = (rowIndex + 1) % 11; + } + + logger.d( + "binaryArray: $binaryArray"); // Use print instead of logger for standalone example + return binaryArray; +} + +String hexToBin(String hex) { + // Convert hex to binary string + String binaryString = BigInt.parse(hex, radix: 16).toRadixString(2); + + // Pad the binary string with leading zeros if necessary to ensure it's a multiple of 8 bits + int paddingLength = (8 - (binaryString.length % 8)) % 8; + binaryString = binaryString.padLeft(binaryString.length + paddingLength, '0'); + logger.d("binaryString: $binaryString"); + return binaryString; +} + +List> binaryStringTo2DList(String binaryString) { + int maxHeight = 11; + List> binary2DList = List.generate(maxHeight, (_) => []); + + for (int x = 0; x < binaryString.length; x++) { + int a = 0; + for (int y = a; y < 11; y++) { + for (int z = 0; z < 8; z++) { + binary2DList[y].add(int.parse(binaryString[x++])); + if (x >= binaryString.length) { + break; + } + } + if (x >= binaryString.length) { + break; + } + } + } + logger.d("binary2DList: $binary2DList"); + return binary2DList; +} diff --git a/lib/bademagic_module/utils/converters.dart b/lib/bademagic_module/utils/converters.dart index a28562d35..883f221aa 100644 --- a/lib/bademagic_module/utils/converters.dart +++ b/lib/bademagic_module/utils/converters.dart @@ -3,10 +3,8 @@ import 'package:badgemagic/bademagic_module/utils/byte_array_utils.dart'; import 'package:badgemagic/bademagic_module/utils/data_to_bytearray_converter.dart'; import 'package:badgemagic/bademagic_module/utils/file_helper.dart'; import 'package:badgemagic/bademagic_module/utils/image_utils.dart'; -import 'package:badgemagic/providers/cardsprovider.dart'; import 'package:badgemagic/providers/badgeview_provider.dart'; import 'package:badgemagic/providers/imageprovider.dart'; -import 'package:badgemagic/view/draw_badge_screen.dart'; import 'package:get_it/get_it.dart'; class Converters { @@ -18,7 +16,6 @@ class Converters { DrawBadgeProvider badgeList = GetIt.instance.get(); int controllerLength = 0; - bool isEmpty = false; Future> messageTohex(String message) async { List hexStrings = []; @@ -43,16 +40,23 @@ class Converters { } } } - if (message.isEmpty) { - badgeList.resetGrid(); - isEmpty = true; + return hexStrings; + } + + void badgeAnimation(String message) async { + if (message == "") { + //geerate a 2d list with all values as 0 + List> image = + List.generate(11, (i) => List.generate(44, (j) => 0)); + badgeList.setNewGrid(image); + badgeList.startAnimation(); } else { - isEmpty = false; + List hexStrings = await messageTohex(message); List byteArray = hexStringToByteArray(hexStrings.join()); - // List> binaryArray = byteArrayToBinaryArray(byteArray); + List> binaryArray = byteArrayToBinaryArray(byteArray); + badgeList.setNewGrid(binaryArray); badgeList.startAnimation(); } - return hexStrings; } //function to convert the bitmap to the LED hex format diff --git a/lib/bademagic_module/utils/image_utils.dart b/lib/bademagic_module/utils/image_utils.dart index 1c8804c4e..097755f63 100644 --- a/lib/bademagic_module/utils/image_utils.dart +++ b/lib/bademagic_module/utils/image_utils.dart @@ -1,6 +1,5 @@ import 'dart:ui' as ui; import 'dart:ui'; -import 'package:badgemagic/bademagic_module/utils/byte_array_utils.dart'; import 'package:badgemagic/bademagic_module/utils/converters.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/lib/badge_animation/animation_abstract.dart b/lib/badge_animation/animation_abstract.dart new file mode 100644 index 000000000..a14bf1e92 --- /dev/null +++ b/lib/badge_animation/animation_abstract.dart @@ -0,0 +1,15 @@ +abstract class BadgeAnimation { + void animation( + List> grid, + List> newGrid, + int animationIndex, + bool validMarquee, + bool flashLEDOn, + int currentcountFrame, + int i, + int j, + int newHeight, + int newWidth, + int badgeHeight, + int badgeWidth); +} diff --git a/lib/constants.dart b/lib/constants.dart index 2ad79f7b1..cae597664 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -15,3 +15,15 @@ const String aniRight = 'assets/animations/ic_anim_right.gif'; const String effFlash = 'assets/effects/ic_effect_flash.gif'; const String effInvert = 'assets/effects/ic_effect_invert.gif'; const String effMarque = 'assets/effects/ic_effect_marquee.gif'; + +//constants for the animation speed +const Duration aniBaseSpeed = Duration(microseconds: 200000); // in uS +const Duration aniMarqueSpeed = Duration(microseconds: 100000); // in uS +const Duration aniFlashSpeed = Duration(microseconds: 500000); // in uS + +// Function to calculate animation speed based on speed level +int aniSpeedStrategy(int speedLevel) { + int speedInMicroseconds = aniBaseSpeed.inMicroseconds - + (speedLevel * aniBaseSpeed.inMicroseconds ~/ 8); + return speedInMicroseconds; +} diff --git a/lib/main.dart b/lib/main.dart index 2609cf8f4..ba31fc99d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,5 @@ import 'package:badgemagic/providers/cardsprovider.dart'; -import 'package:badgemagic/providers/drawbadge_provider.dart'; +import 'package:badgemagic/providers/badgeview_provider.dart'; import 'package:badgemagic/providers/getitlocator.dart'; import 'package:badgemagic/providers/imageprovider.dart'; import 'package:badgemagic/view/draw_badge_screen.dart'; diff --git a/lib/providers/badgeview_provider.dart b/lib/providers/badgeview_provider.dart new file mode 100644 index 000000000..6a913be9d --- /dev/null +++ b/lib/providers/badgeview_provider.dart @@ -0,0 +1,203 @@ +import 'dart:async'; + +import 'package:badgemagic/bademagic_module/utils/byte_array_utils.dart'; +import 'package:badgemagic/badge_animation/animation_abstract.dart'; +import 'package:badgemagic/constants.dart'; +import 'package:badgemagic/providers/cardsprovider.dart'; +import 'package:flutter/material.dart'; +import 'package:get_it/get_it.dart'; + +class DrawBadgeProvider extends ChangeNotifier { + CardProvider cardData = GetIt.instance(); + int countFrame = 0; + int animationIndex = 0; + int lastFrame = 0; + AnimationController? _controller; + int animationSpeed = aniBaseSpeed.inMilliseconds; + int counter = 0; + Timer? timer; + //List that contains the state of each cell of the badge for home view + List> homeViewGrid = + List.generate(11, (i) => List.generate(44, (j) => false)); + + //List that contains the state of each cell of the badge for draw view + List> drawViewGrid = + List.generate(11, (i) => List.generate(44, (j) => false)); + + //getter for the drawViewGrid + List> getDrawViewGrid() => drawViewGrid; + + //setter for the drawViewGrid + void setDrawViewGrid(List> newGrid) { + drawViewGrid = newGrid; + notifyListeners(); + } + + BadgeAnimation? currentAnimation; + + //function to update the state of the cell + void updateGrid(int row, int col) { + homeViewGrid[row][col] = isDrawing; + notifyListeners(); + } + + //function to reset the state of the cell + void resetGrid() { + homeViewGrid = List.generate(11, (i) => List.generate(44, (j) => false)); + notifyListeners(); + } + + //function to get the state of the cell + List> getGrid() => homeViewGrid; + + //boolean variable to check for isDrawing on Draw badge screen + bool isDrawing = true; + + //function to toggle the isDrawing variable + void toggleIsDrawing(bool drawing) { + isDrawing = drawing; + notifyListeners(); + } + + //function to calculate duration for the animation + void calculateDuration() { + int newSpeed = aniSpeedStrategy(cardData.getOuterValue()); + if (newSpeed != animationSpeed) { + animationSpeed = newSpeed; + timer?.cancel(); + startTimer(); + } + } + + //function to get the isDrawing variable + bool getIsDrawing() => isDrawing; + + List> newGrid = + List.generate(11, (i) => List.generate(44, (j) => 0)); + + //getter for newGrid + List> getNewGrid() => newGrid; + + //setter for newGrid + void setNewGrid(List> newGrid) { + this.newGrid = newGrid; + notifyListeners(); + } + + void initializeAnimation(TickerProvider vsync) { + _controller = AnimationController( + vsync: vsync, + duration: const Duration(seconds: 1000), + )..addListener(() { + setAnimationMode(); + changeGridValue(newGrid); + calculateDuration(); + }); + startTimer(); + _controller!.repeat(); + } + + void startTimer() { + logger.i("Timer started"); + logger.i("Animation speed: $animationSpeed"); + timer = + Timer.periodic(Duration(microseconds: animationSpeed), (Timer timer) { + animationIndex++; + }); + } + + void startAnimation() { + animationIndex = 0; + _controller!.forward(); + } + + void setAnimationMode() { + switch (cardData.getAnimationIndex()) { + //add cases from 0 to 8 + case 0: + currentAnimation = null; + break; + case 1: + // currentAnimation = RightAnimation(); + break; + case 2: + // currentAnimation = UpAnimation(); + break; + case 3: + // currentAnimation = DownAnimation(); + break; + case 4: + // currentAnimation = FixedAnimation(); + break; + case 5: + // currentAnimation = SnowFlakeAnimation(); + break; + case 6: + currentAnimation = null; + break; + case 7: + currentAnimation = null; + break; + case 8: + currentAnimation = null; + break; + default: + currentAnimation = null; + break; + } + } + + void changeGridValue(List> newGrid) { + int badgeWidth = homeViewGrid[0].length; + int badgeHeight = homeViewGrid.length; + int newHeight = newGrid.length; + int newWidth = newGrid[0].length; + + // Process grid + for (int i = 0; i < badgeHeight; i++) { + // bool matchFrame = false; + + for (int j = 0; j < badgeWidth; j++) { + bool flashLEDOn = true; + + if (cardData.getEffectIndex(1) == 1) { + int aIFlash = animationIndex % 2; + flashLEDOn = aIFlash == 0; + } + + bool validMarquee = false; + + if (cardData.getEffectIndex(2) == 1) { + int aIMarquee = animationIndex ~/ 2; + validMarquee = + (i == 0 || j == 0 || i == badgeHeight - 1 || j == badgeWidth - 1); + + if (validMarquee) { + if ((i == 0 || j == badgeWidth - 1) && + !(i == badgeHeight - 1 && j == badgeWidth - 1)) { + validMarquee = (i + j) % 4 == (aIMarquee % 4); + } else { + validMarquee = (i + j - 1) % 4 == (3 - (aIMarquee % 4)); + } + } + } + if (currentAnimation != null) { + currentAnimation!.animation( + homeViewGrid, + newGrid, + animationIndex, + validMarquee, + flashLEDOn, + countFrame, + i, + j, + newHeight, + newWidth, + badgeHeight, + badgeWidth); + } + } + notifyListeners(); + } + } +} diff --git a/lib/providers/drawbadge_provider.dart b/lib/providers/drawbadge_provider.dart deleted file mode 100644 index b08a434e9..000000000 --- a/lib/providers/drawbadge_provider.dart +++ /dev/null @@ -1,34 +0,0 @@ -import 'package:flutter/material.dart'; - -class DrawBadgeProvider extends ChangeNotifier { - //List that contains the state of each cell of the badge - List> grid = - List.generate(11, (i) => List.generate(44, (j) => false)); - - //function to update the state of the cell - void updateGrid(int row, int col) { - grid[row][col] = isDrawing; - notifyListeners(); - } - - //function to reset the state of the cell - void resetGrid() { - grid = List.generate(11, (i) => List.generate(44, (j) => false)); - notifyListeners(); - } - - //function to get the state of the cell - List> getGrid() => grid; - - //boolean variable to check for isDrawing on Draw badge screen - bool isDrawing = true; - - //function to toggle the isDrawing variable - void toggleIsDrawing(bool drawing) { - isDrawing = drawing; - notifyListeners(); - } - - //function to get the isDrawing variable - bool getIsDrawing() => isDrawing; -} diff --git a/lib/providers/getitlocator.dart b/lib/providers/getitlocator.dart index a9cf3432f..c6dd3e09d 100644 --- a/lib/providers/getitlocator.dart +++ b/lib/providers/getitlocator.dart @@ -1,5 +1,5 @@ import 'package:badgemagic/providers/cardsprovider.dart'; -import 'package:badgemagic/providers/drawbadge_provider.dart'; +import 'package:badgemagic/providers/badgeview_provider.dart'; import 'package:badgemagic/providers/imageprovider.dart'; import 'package:get_it/get_it.dart'; diff --git a/lib/view/draw_badge_screen.dart b/lib/view/draw_badge_screen.dart index aff778a8f..e0713ce89 100644 --- a/lib/view/draw_badge_screen.dart +++ b/lib/view/draw_badge_screen.dart @@ -1,6 +1,6 @@ import 'package:badgemagic/bademagic_module/utils/file_helper.dart'; import 'package:badgemagic/constants.dart'; -import 'package:badgemagic/providers/drawbadge_provider.dart'; +import 'package:badgemagic/providers/badgeview_provider.dart'; import 'package:badgemagic/view/widgets/common_scaffold_widget.dart'; import 'package:badgemagic/virtualbadge/view/draw_badge.dart'; import 'package:flutter/material.dart'; diff --git a/lib/view/homescreen.dart b/lib/view/homescreen.dart index 36385ecd2..53710abfe 100644 --- a/lib/view/homescreen.dart +++ b/lib/view/homescreen.dart @@ -1,10 +1,12 @@ +import 'dart:async'; + import 'package:badgemagic/bademagic_module/utils/byte_array_utils.dart'; import 'package:badgemagic/bademagic_module/utils/converters.dart'; import 'package:badgemagic/bademagic_module/utils/image_utils.dart'; import 'package:badgemagic/constants.dart'; import 'package:badgemagic/providers/badge_message_provider.dart'; import 'package:badgemagic/providers/cardsprovider.dart'; -import 'package:badgemagic/providers/drawbadge_provider.dart'; +import 'package:badgemagic/providers/badgeview_provider.dart'; import 'package:badgemagic/providers/imageprovider.dart'; import 'package:badgemagic/view/special_text_field.dart'; import 'package:badgemagic/view/widgets/common_scaffold_widget.dart'; @@ -27,6 +29,7 @@ class HomeScreen extends StatefulWidget { } class _HomeScreenState extends State with TickerProviderStateMixin { + final ValueNotifier textNotifier = ValueNotifier(''); late final TabController _tabController; BadgeMessageProvider badgeData = BadgeMessageProvider(); ImageUtils imageUtils = ImageUtils(); @@ -39,10 +42,12 @@ class _HomeScreenState extends State with TickerProviderStateMixin { @override void initState() { + inlineImageProvider.getController().addListener(_controllerListner); drawBadgeProvider.resetGrid(); SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, ]); + drawBadgeProvider.initializeAnimation(this); _startImageCaching(); super.initState(); @@ -52,7 +57,9 @@ class _HomeScreenState extends State with TickerProviderStateMixin { void _controllerListner() { logger .d('Controller Listener : ${inlineImageProvider.getController().text}'); - converters.messageTohex(inlineImageProvider.getController().text); + converters.badgeAnimation(inlineImageProvider.getController().text.isEmpty + ? "" + : inlineImageProvider.getController().text); inlineImageProvider.controllerListener(); } @@ -101,9 +108,7 @@ class _HomeScreenState extends State with TickerProviderStateMixin { borderRadius: BorderRadius.circular(10.r), elevation: 10, child: ExtendedTextField( - onChanged: (value) { - inlineImageProvider.controllerListener(); - }, + onChanged: (value) {}, controller: inlineImageProvider.getController(), specialTextSpanBuilder: MySpecialTextSpanBuilder(), decoration: InputDecoration( diff --git a/lib/virtualbadge/view/badge_home_view.dart b/lib/virtualbadge/view/badge_home_view.dart index ca94ddd93..95e7ac2bc 100644 --- a/lib/virtualbadge/view/badge_home_view.dart +++ b/lib/virtualbadge/view/badge_home_view.dart @@ -1,6 +1,8 @@ +import 'package:badgemagic/providers/badgeview_provider.dart'; import 'package:badgemagic/virtualbadge/widgets/badge_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:provider/provider.dart'; class BMBadgeHome extends StatefulWidget { const BMBadgeHome({super.key}); @@ -12,6 +14,7 @@ class BMBadgeHome extends StatefulWidget { class _BMBadgeHomeState extends State { @override Widget build(BuildContext context) { + final grid = Provider.of(context).getGrid(); return Container( margin: EdgeInsets.only(top: 8.h, left: 15.w, right: 15.w), padding: EdgeInsets.all(8.dg), @@ -22,7 +25,9 @@ class _BMBadgeHomeState extends State { border: Border.all(color: Colors.black), borderRadius: BorderRadius.circular(10), ), - child: const BadgeWidget(), + child: BadgeWidget( + grid: grid, + ), ); } } diff --git a/lib/virtualbadge/view/draw_badge.dart b/lib/virtualbadge/view/draw_badge.dart index b3bf0c2ae..228da4583 100644 --- a/lib/virtualbadge/view/draw_badge.dart +++ b/lib/virtualbadge/view/draw_badge.dart @@ -1,7 +1,8 @@ -import 'package:badgemagic/providers/drawbadge_provider.dart'; +import 'package:badgemagic/providers/badgeview_provider.dart'; import 'package:badgemagic/virtualbadge/widgets/badge_widget.dart'; import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; +import 'package:provider/provider.dart'; class BMBadge extends StatefulWidget { const BMBadge({super.key}); @@ -31,9 +32,12 @@ class _BMBadgeState extends State { @override Widget build(BuildContext context) { + final grid = Provider.of(context).getDrawViewGrid(); return GestureDetector( onPanUpdate: _handlePanUpdate, - child: const BadgeWidget(), + child: BadgeWidget( + grid: grid, + ), ); } } diff --git a/lib/virtualbadge/widgets/badge_widget.dart b/lib/virtualbadge/widgets/badge_widget.dart index 217e0d3d9..f03d5ec96 100644 --- a/lib/virtualbadge/widgets/badge_widget.dart +++ b/lib/virtualbadge/widgets/badge_widget.dart @@ -1,13 +1,12 @@ -import 'package:badgemagic/providers/drawbadge_provider.dart'; import 'package:badgemagic/virtualbadge/view/badge_painter.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; class BadgeWidget extends StatefulWidget { static const int rows = 11; static const int cols = 44; + final List> grid; - const BadgeWidget({super.key}); + const BadgeWidget({super.key, required this.grid}); @override State createState() => _BadgeWidgetState(); @@ -16,10 +15,9 @@ class BadgeWidget extends StatefulWidget { class _BadgeWidgetState extends State { @override Widget build(BuildContext context) { - DrawBadgeProvider cellStateToggle = Provider.of(context); return CustomPaint( size: const Size(400, 480), - painter: BadgePainter(grid: cellStateToggle.getGrid()), + painter: BadgePainter(grid: widget.grid), ); } } diff --git a/pubspec.lock b/pubspec.lock index 0258121a0..57899b00c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -101,10 +101,10 @@ packages: dependency: "direct main" description: name: extended_text_field - sha256: d3f3f8d37e516f0e805b4a41283833f86fc10fecc83abe51d7223ec9a64e136a + sha256: "954c7eea1e82728a742f7ddf09b9a51cef087d4f52b716ba88cb3eb78ccd7c6e" url: "https://pub.dev" source: hosted - version: "16.0.0" + version: "15.0.0" extended_text_library: dependency: transitive description: @@ -238,18 +238,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: @@ -286,18 +286,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.12.0" nested: dependency: transitive description: @@ -390,10 +390,10 @@ packages: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -491,10 +491,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.0" typed_data: dependency: transitive description: @@ -547,10 +547,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.2.1" watcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a6b367be1..0578dc534 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -41,7 +41,7 @@ dependencies: flutter_svg: ^2.0.10+1 get_it: ^7.7.0 flutter_screenutil: ^5.9.3 - extended_text_field: ^16.0.0 + extended_text_field: ^15.0.0 path_provider: ^2.1.4 uuid: ^4.5.0 From 4be7e17d585b8028c874c26eabfdebed02f57ab6 Mon Sep 17 00:00:00 2001 From: Jhalakupadhyay Date: Sun, 8 Sep 2024 02:27:48 +0530 Subject: [PATCH 3/6] chore: update flutter version to 3.24.2 from 3.22.2. --- pubspec.lock | 69 +++++++++++++++++++++++++++++++--------------------- pubspec.yaml | 2 +- 2 files changed, 42 insertions(+), 29 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 57899b00c..48ec17c3b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,18 +5,23 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 url: "https://pub.dev" source: hosted - version: "67.0.0" + version: "72.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.2" analyzer: dependency: transitive description: name: analyzer - sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 url: "https://pub.dev" source: hosted - version: "6.4.1" + version: "6.7.0" args: dependency: transitive description: @@ -77,10 +82,10 @@ packages: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" cupertino_icons: dependency: "direct main" description: @@ -101,10 +106,10 @@ packages: dependency: "direct main" description: name: extended_text_field - sha256: "954c7eea1e82728a742f7ddf09b9a51cef087d4f52b716ba88cb3eb78ccd7c6e" + sha256: d3f3f8d37e516f0e805b4a41283833f86fc10fecc83abe51d7223ec9a64e136a url: "https://pub.dev" source: hosted - version: "15.0.0" + version: "16.0.0" extended_text_library: dependency: transitive description: @@ -125,10 +130,10 @@ packages: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" file: dependency: transitive description: @@ -238,18 +243,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -274,6 +279,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" matcher: dependency: transitive description: @@ -286,18 +299,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" nested: dependency: transitive description: @@ -342,10 +355,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "490539678396d4c3c0b06efdaab75ae60675c3e0c66f72bc04c2e2c1e0e2abeb" + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.9" + version: "2.2.10" path_provider_foundation: dependency: transitive description: @@ -390,10 +403,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -491,10 +504,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" typed_data: dependency: transitive description: @@ -547,10 +560,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.5" watcher: dependency: transitive description: @@ -600,5 +613,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index 0578dc534..a6b367be1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -41,7 +41,7 @@ dependencies: flutter_svg: ^2.0.10+1 get_it: ^7.7.0 flutter_screenutil: ^5.9.3 - extended_text_field: ^15.0.0 + extended_text_field: ^16.0.0 path_provider: ^2.1.4 uuid: ^4.5.0 From 297dba7652afc477a0d3125219913d0571df75ca Mon Sep 17 00:00:00 2001 From: Jhalakupadhyay Date: Mon, 9 Sep 2024 19:20:55 +0530 Subject: [PATCH 4/6] feat: Added the left animation. --- lib/badge_animation/anim_left.dart | 32 ++++++++++++++++++++++++ lib/providers/badgeview_provider.dart | 9 ++++--- lib/virtualbadge/view/badge_painter.dart | 4 ++- 3 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 lib/badge_animation/anim_left.dart diff --git a/lib/badge_animation/anim_left.dart b/lib/badge_animation/anim_left.dart new file mode 100644 index 000000000..6ed88a2b3 --- /dev/null +++ b/lib/badge_animation/anim_left.dart @@ -0,0 +1,32 @@ +import 'package:badgemagic/badge_animation/animation_abstract.dart'; + +class LeftAnimation extends BadgeAnimation { + @override + void animation( + List> grid, + List> newGrid, + int animationIndex, + bool validMarquee, + bool flashLEDOn, + int currentcountFrame, + int i, + int j, + int newHeight, + int newWidth, + int badgeHeight, + int badgeWidth) { + // Calculate how much of the new grid is currently visible in the grid + int scrollOffset = animationIndex % (newWidth + badgeWidth); + + // Get the corresponding column in the new grid based on the scroll position + int sourceCol = j + scrollOffset - badgeWidth; + + // If sourceCol is negative, display blank space (off-screen part of the grid) + if (sourceCol >= 0 && sourceCol < newWidth) { + // Ensure flashLEDOn and validMarquee effects are applied + grid[i][j] = flashLEDOn && newGrid[i % newHeight][sourceCol] == 1; + } else { + grid[i][j] = false; + } + } +} diff --git a/lib/providers/badgeview_provider.dart b/lib/providers/badgeview_provider.dart index 6a913be9d..dc6e27625 100644 --- a/lib/providers/badgeview_provider.dart +++ b/lib/providers/badgeview_provider.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:badgemagic/bademagic_module/utils/byte_array_utils.dart'; +import 'package:badgemagic/badge_animation/anim_left.dart'; import 'package:badgemagic/badge_animation/animation_abstract.dart'; import 'package:badgemagic/constants.dart'; import 'package:badgemagic/providers/cardsprovider.dart'; @@ -61,7 +62,7 @@ class DrawBadgeProvider extends ChangeNotifier { //function to calculate duration for the animation void calculateDuration() { - int newSpeed = aniSpeedStrategy(cardData.getOuterValue()); + int newSpeed = aniSpeedStrategy(cardData.getOuterValue()-1); if (newSpeed != animationSpeed) { animationSpeed = newSpeed; timer?.cancel(); @@ -87,7 +88,7 @@ class DrawBadgeProvider extends ChangeNotifier { void initializeAnimation(TickerProvider vsync) { _controller = AnimationController( vsync: vsync, - duration: const Duration(seconds: 1000), + duration: const Duration(days: 1000), )..addListener(() { setAnimationMode(); changeGridValue(newGrid); @@ -115,7 +116,7 @@ class DrawBadgeProvider extends ChangeNotifier { switch (cardData.getAnimationIndex()) { //add cases from 0 to 8 case 0: - currentAnimation = null; + currentAnimation = LeftAnimation(); break; case 1: // currentAnimation = RightAnimation(); @@ -142,7 +143,7 @@ class DrawBadgeProvider extends ChangeNotifier { currentAnimation = null; break; default: - currentAnimation = null; + currentAnimation = LeftAnimation(); break; } } diff --git a/lib/virtualbadge/view/badge_painter.dart b/lib/virtualbadge/view/badge_painter.dart index 717a50a20..f9fc66e2f 100644 --- a/lib/virtualbadge/view/badge_painter.dart +++ b/lib/virtualbadge/view/badge_painter.dart @@ -15,7 +15,9 @@ class BadgePainter extends CustomPainter { for (int row = 0; row < grid.length; row++) { for (int col = 0; col < grid[row].length; col++) { final Paint paint = Paint() - ..color = grid[row][col] ? Colors.red : Colors.grey.shade600 + ..color = grid[row][col] + ? const Color.fromARGB(255, 255, 0, 0) + : Colors.grey.shade900 ..style = PaintingStyle.fill; final Path path = Path() From ac4f9a6765eb04d7fe9cf1ef0374d97f2f1cf7fe Mon Sep 17 00:00:00 2001 From: Jhalakupadhyay Date: Mon, 9 Sep 2024 19:52:04 +0530 Subject: [PATCH 5/6] feat: Updated the code and created the right animation. --- lib/badge_animation/ani_right.dart | 32 +++++++++++++++++++++++++++ lib/badge_animation/anim_left.dart | 21 +++++++++--------- lib/providers/badgeview_provider.dart | 5 +++-- 3 files changed, 46 insertions(+), 12 deletions(-) create mode 100644 lib/badge_animation/ani_right.dart diff --git a/lib/badge_animation/ani_right.dart b/lib/badge_animation/ani_right.dart new file mode 100644 index 000000000..2da0b7985 --- /dev/null +++ b/lib/badge_animation/ani_right.dart @@ -0,0 +1,32 @@ +import 'package:badgemagic/badge_animation/animation_abstract.dart'; + +class RightAnimation extends BadgeAnimation { + @override + void animation( + List> grid, + List> newGrid, + int animationIndex, + bool validMarquee, + bool flashLEDOn, + int currentcountFrame, + int i, + int j, + int newHeight, + int newWidth, + int badgeHeight, + int badgeWidth) { + // Calculate the scroll offset to move from left to right + int scrollOffset = animationIndex % (newWidth + badgeWidth); + + // Get the corresponding column in the new grid based on the reversed scroll position + int sourceCol = newWidth - scrollOffset + j; + + // If sourceCol is within bounds of the new grid, display it, else blank space + if (sourceCol >= 0 && sourceCol < newWidth) { + grid[i][j] = + validMarquee || flashLEDOn && newGrid[i % newHeight][sourceCol] == 1; + } else { + validMarquee ? grid[i][j] = true : grid[i][j] = false; + } + } +} diff --git a/lib/badge_animation/anim_left.dart b/lib/badge_animation/anim_left.dart index 6ed88a2b3..4b6869cfd 100644 --- a/lib/badge_animation/anim_left.dart +++ b/lib/badge_animation/anim_left.dart @@ -18,15 +18,16 @@ class LeftAnimation extends BadgeAnimation { // Calculate how much of the new grid is currently visible in the grid int scrollOffset = animationIndex % (newWidth + badgeWidth); - // Get the corresponding column in the new grid based on the scroll position - int sourceCol = j + scrollOffset - badgeWidth; - - // If sourceCol is negative, display blank space (off-screen part of the grid) - if (sourceCol >= 0 && sourceCol < newWidth) { - // Ensure flashLEDOn and validMarquee effects are applied - grid[i][j] = flashLEDOn && newGrid[i % newHeight][sourceCol] == 1; - } else { - grid[i][j] = false; - } + // Get the corresponding column in the new grid based on the scroll position + int sourceCol = j + scrollOffset - badgeWidth; + + // If sourceCol is negative, display blank space (off-screen part of the grid) + if (sourceCol >= 0 && sourceCol < newWidth) { + // Ensure flashLEDOn and validMarquee effects are applied + grid[i][j] = + validMarquee || flashLEDOn && newGrid[i % newHeight][sourceCol] == 1; + } else { + validMarquee ? grid[i][j] = true : grid[i][j] = false; + } } } diff --git a/lib/providers/badgeview_provider.dart b/lib/providers/badgeview_provider.dart index dc6e27625..6453a174a 100644 --- a/lib/providers/badgeview_provider.dart +++ b/lib/providers/badgeview_provider.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:badgemagic/bademagic_module/utils/byte_array_utils.dart'; +import 'package:badgemagic/badge_animation/ani_right.dart'; import 'package:badgemagic/badge_animation/anim_left.dart'; import 'package:badgemagic/badge_animation/animation_abstract.dart'; import 'package:badgemagic/constants.dart'; @@ -62,7 +63,7 @@ class DrawBadgeProvider extends ChangeNotifier { //function to calculate duration for the animation void calculateDuration() { - int newSpeed = aniSpeedStrategy(cardData.getOuterValue()-1); + int newSpeed = aniSpeedStrategy(cardData.getOuterValue() - 1); if (newSpeed != animationSpeed) { animationSpeed = newSpeed; timer?.cancel(); @@ -119,7 +120,7 @@ class DrawBadgeProvider extends ChangeNotifier { currentAnimation = LeftAnimation(); break; case 1: - // currentAnimation = RightAnimation(); + currentAnimation = RightAnimation(); break; case 2: // currentAnimation = UpAnimation(); From 35e69e846b6f48ea151106d88421f4f4028a48bb Mon Sep 17 00:00:00 2001 From: Jhalakupadhyay Date: Thu, 12 Sep 2024 18:02:27 +0530 Subject: [PATCH 6/6] Added the fixed animation. --- lib/badge_animation/ani_fixed.dart | 27 +++++++++++++++++++++++++++ lib/providers/badgeview_provider.dart | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 lib/badge_animation/ani_fixed.dart diff --git a/lib/badge_animation/ani_fixed.dart b/lib/badge_animation/ani_fixed.dart new file mode 100644 index 000000000..c605ed6cb --- /dev/null +++ b/lib/badge_animation/ani_fixed.dart @@ -0,0 +1,27 @@ +import 'package:badgemagic/badge_animation/animation_abstract.dart'; + +class FixedAnimation extends BadgeAnimation { + @override + void animation( + List> grid, + List> newGrid, + int animationIndex, + bool validMarquee, + bool flashLEDOn, + int currentcountFrame, + int i, + int j, + int newHeight, + int newWidth, + int badgeHeight, + int badgeWidth) { + if (newWidth <= badgeWidth + 4) { + grid[i][j] = validMarquee || + i >= 0 && + i < newHeight && + j >= 0 && + j < newWidth && + (flashLEDOn && newGrid[i][j] == 1); + } + } +} diff --git a/lib/providers/badgeview_provider.dart b/lib/providers/badgeview_provider.dart index 6453a174a..9e2708078 100644 --- a/lib/providers/badgeview_provider.dart +++ b/lib/providers/badgeview_provider.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:badgemagic/bademagic_module/utils/byte_array_utils.dart'; +import 'package:badgemagic/badge_animation/ani_fixed.dart'; import 'package:badgemagic/badge_animation/ani_right.dart'; import 'package:badgemagic/badge_animation/anim_left.dart'; import 'package:badgemagic/badge_animation/animation_abstract.dart'; @@ -129,7 +130,7 @@ class DrawBadgeProvider extends ChangeNotifier { // currentAnimation = DownAnimation(); break; case 4: - // currentAnimation = FixedAnimation(); + currentAnimation = FixedAnimation(); break; case 5: // currentAnimation = SnowFlakeAnimation();