Skip to content

Commit

Permalink
Merge branch 'CCExtractor:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
its-me-abhishek authored Nov 20, 2023
2 parents e126251 + 5149f64 commit 136bedd
Showing 1 changed file with 37 additions and 20 deletions.
57 changes: 37 additions & 20 deletions lib/views/profile/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -185,26 +185,43 @@ class ProfilesColumn extends StatelessWidget {
height: 6,
),
ElevatedButton.icon(
onPressed: () {
try {
addProfile();
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: const Text('Profile Added Successfully'),
backgroundColor: AppSettings.isDarkMode
? const Color.fromARGB(255, 61, 61, 61)
: const Color.fromARGB(255, 39, 39, 39),
duration: const Duration(seconds: 2)));
} catch (e) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: const Text('Profile Additon Failed'),
backgroundColor: AppSettings.isDarkMode
? const Color.fromARGB(255, 61, 61, 61)
: const Color.fromARGB(255, 39, 39, 39),
duration: const Duration(seconds: 2)));
}
},
icon: const Icon(Icons.add),
label: const Text('Add new Profile'))
onPressed: () {
try {
addProfile();
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: const Text('Profile Added Successfully'),
backgroundColor: AppSettings.isDarkMode
? const Color.fromARGB(255, 61, 61, 61)
: const Color.fromARGB(255, 39, 39, 39),
duration: const Duration(seconds: 2)));
} catch (e) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: const Text('Profile Additon Failed'),
backgroundColor: AppSettings.isDarkMode
? const Color.fromARGB(255, 61, 61, 61)
: const Color.fromARGB(255, 39, 39, 39),
duration: const Duration(seconds: 2)));
}
},
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(
AppSettings.isDarkMode
? const Color.fromARGB(255, 61, 61, 61)
: Colors.white,
),
),
icon: Icon(Icons.add,
color: AppSettings.isDarkMode
? Colors.deepPurpleAccent
: Colors.deepPurple),
label: Text(
'Add new Profile',
style: TextStyle(
color:
AppSettings.isDarkMode ? Colors.white : Colors.deepPurple,
),
),
)
],
),
);
Expand Down

0 comments on commit 136bedd

Please sign in to comment.