Search
 
SCRIPT & CODE EXAMPLE
 

DART

materialstateproperty color

ElevatedButton(
          style: ButtonStyle(
          backgroundColor: MaterialStateProperty.all(Colors.amberAccent)),
          onPressed: () {},
          child: const Text(
            "Hover Me",
            style: TextStyle(
              fontSize: 20,
            ),
          ),
        ),
Comment

MaterialStateProperty? backgroundColor

backgroundColor: MaterialStateProperty.all(Colors.red),
//OR
backgroundColor: MaterialStateProperty.all(Color(0xFF5D5F6E)),
Comment

MaterialStateProperty flutter

// ** Declaration ** //
MaterialStateProperty<Color?>? redColor = MaterialStateProperty.all(Colors.red);
// backgroundColor property
backgroundColor: MaterialStateProperty.all(Colors.green),
//OR
backgroundColor: MaterialStateProperty.all(Color(0xFFEDEDED)),
Comment

PREVIOUS NEXT
Code Example
Dart :: flutter label align top 
Dart :: flutter check if string is number dart 
Dart :: flutter textinput number 
Dart :: dart datetime parse 
Dart :: sleep in dart 
Dart :: flutter textfield rounded 
Dart :: bad state insecure http is not allowed flutter 
Dart :: flutter snackbar shape 
Dart :: flutter checkbox 
Dart :: FirebaseOptions cannot be null when creating the default app 
Dart :: file picker flutter file size 
Dart :: hide debug flag flutter 
Dart :: toast flutter 
Dart :: flutter button with icon 
Dart :: flutter remove map 
Dart :: alertdialog flutter barrierColor 
Dart :: how to put tapping effect on card in flutter 
Dart :: Flutter Text size to fit 
Dart :: linearprogressindicator flutter 
Dart :: text wrap in flutter 
Dart :: dart super constructor 
Dart :: flutter datetime add year 
Dart :: flutter refresh page 
Dart :: bottomsheet shape flutter 
Dart :: getters and setters dart 
Dart :: cupertino icons flutter 
Dart :: border radius to card flutter dart 
Dart :: flutter list distinct 
Dart :: flutter print http response 
Dart :: how to get isoCode based on location in flutter 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =