MaterialStateProperty 플러터

코드 예제

1
0

MaterialStateProperty 플러터

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

materialstateproperty 색상

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

비슷한 페이지

예제가있는 유사한 페이지

다른 언어로

이 페이지는 다른 언어로되어 있습니다

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................