changed primary color usage to fix the color bug in dark mode
Changed Theme.of(context).primaryColor to Theme.of(contex).colorScheme.primary to make dark mode work properly.
This commit is contained in:
@@ -34,12 +34,13 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(role, style: const TextStyle(color: Colors.grey)),
|
||||
Text(role,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.onSurface)),
|
||||
const SizedBox(height: 4),
|
||||
GestureDetector(
|
||||
onTap: () => _launchEmailAddress(email),
|
||||
child: Text(email,
|
||||
style: TextStyle(color: Theme.of(context).primaryColor)),
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.primary)),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
GestureDetector(
|
||||
@@ -56,11 +57,7 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
AppLocalizations.of(context).enquiry,
|
||||
style:
|
||||
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
title: Text(AppLocalizations.of(context).enquiry),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Padding(
|
||||
@@ -72,12 +69,11 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
AppLocalizations.of(context).writeToUs,
|
||||
style: const TextStyle(color: Colors.grey),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
"complaint@kccb.in",
|
||||
style: TextStyle(color: Theme.of(context).primaryColor),
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.primary),
|
||||
),
|
||||
|
||||
const SizedBox(height: 20),
|
||||
@@ -85,11 +81,11 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
AppLocalizations.of(context).keyContacts,
|
||||
style: TextStyle(
|
||||
fontSize: 17,
|
||||
color: Theme.of(context).primaryColor,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
// horizontal line
|
||||
),
|
||||
Divider(color: Colors.grey[300]),
|
||||
Divider(color: Theme.of(context).colorScheme.outline),
|
||||
const SizedBox(height: 16),
|
||||
_buildContactItem(
|
||||
AppLocalizations.of(context).chairman,
|
||||
|
Reference in New Issue
Block a user