Search
 
SCRIPT & CODE EXAMPLE
 

DART

flutter style diabled button

ElevatedButton(
      onPressed: null,
      child: Text('Submit disable'),
      style: ButtonStyle(
        onSurface: Colors.white,
      ),
    ),
Comment

flutter style diabled button

ElevatedButton(
      onPressed: null,
      child: Text('Submit disable'),
      style: ButtonStyle(
        backgroundColor: MaterialStateProperty.resolveWith<Color>(
          (Set<MaterialState> states) {
            if (states.contains(MaterialState.pressed))
              return Theme.of(context)
                  .colorScheme
                  .primary
                  .withOpacity(0.5);
            else if (states.contains(MaterialState.disabled))
              return Colors.green;
            return null; // Use the component's default.
          },
        ),
      ),
    ),
Comment

PREVIOUS NEXT
Code Example
Dart :: flutter tooltip height 
Dart :: remove duplicates from array dart 
Dart :: flutter container height 100 percent 
Dart :: change icon color flutter 
Dart :: inkwell in image flutter not working 
Dart :: flutter remove value from list 
Dart :: send json to api flutter post 
Dart :: space around in flutter 
Dart :: splite number in dart 
Dart :: getting pi in flutter 
Dart :: replaceall dart 
Dart :: listview inside column flutter 
Dart :: flutter pretext on textfield 
Dart :: flutter random true false 
Dart :: convert string to list in dart 
Dart :: datetimeoffset flutter 
Dart :: consumer flutter 
Dart :: listview space between items flutter 
Dart :: flutter snackbar action button text color 
Dart :: flutter count list 
Dart :: how to do type casting in dart for string 
Dart :: flutter list to map 
Dart :: Main function for flutter 
Dart :: dart create hash 
Dart :: flutter otp input scrren 
Dart :: flutter api service example 
Dart :: concatenate in flutter 
Dart :: Concatenate two list in Flutter 
Dart :: path dart 
Dart :: is init state executed when returning with navigator flutter 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =