-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Formated code and resolved the issue for the screen rotation.
- Loading branch information
1 parent
ab6c567
commit f99ef67
Showing
9 changed files
with
97 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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 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,35 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class DrawBadgeProvider extends ChangeNotifier{ | ||
|
||
//List that contains the state of each cell of the badge | ||
List<List<bool>> 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<List<bool>> 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; | ||
} |
This file contains 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 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 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 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 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 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 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