Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrated the tags/labels feature #433

Merged
merged 7 commits into from
Aug 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added the labels section in the report page
  • Loading branch information
Uttkarsh-raj committed Aug 8, 2024
commit 624e667f4f6d8108b541d2c0b7cd7919a7010139
53 changes: 53 additions & 0 deletions lib/src/pages/home/report_bug.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,26 @@ class _ReportFormState extends ConsumerState<ReportForm> {
"Design",
"Server down"
];
List<String> _labels = [
"Web Development",
"Backend",
"Frontend",
"App Developement",
"Cyber-Security",
"Algorithms",
"Machine Learning",
"Dev-Ops",
];
List<bool> _labelsState = [
false,
false,
false,
false,
false,
false,
false,
false,
];

Future<void> _pickImageFromGallery() async {
final imageFile = await picker.pickMultiImage();
Expand Down Expand Up @@ -974,6 +994,39 @@ class _ReportFormState extends ConsumerState<ReportForm> {
],
),
),
SizedBox(height: 14),
Wrap(
spacing: 5.0,
children: List<Widget>.generate(_labels.length, (int index) {
return ChoiceChip(
label: Text(
_labels[index],
style: (_labelsState[index])
? GoogleFonts.ubuntu(
textStyle: TextStyle(
color: Colors.white,
fontSize: 12,
),
)
: GoogleFonts.aBeeZee(
textStyle: TextStyle(
fontSize: 12,
),
),
),
checkmarkColor: Colors.white,
selected: _labelsState[index],
onSelected: (value) {
setState(() {
_labelsState[index] = !_labelsState[index];
});
},
selectedColor: isDarkMode
? Color.fromRGBO(126, 33, 58, 1)
: Color(0xFFDC4654),
);
}),
),
Padding(
padding: EdgeInsets.fromLTRB(0, 16, 0, 16),
child: Text(
Expand Down