Как я могу сделать этот эффект кнопки для калькулятора во Flutter? ⇐ CSS

Разбираемся в CSS
Гость
Как я могу сделать этот эффект кнопки для калькулятора во Flutter?

Сообщение Гость »

Я хочу сделать этот дизайн кнопки, но пока не могу сделать это правильно, я играл с backgroundBlendMode, но у меня это невозможно.

Код: Выделить всё

Widget buildButton(String value) {
return Container(
margin: const EdgeInsets.all(5.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.0),
gradient: const LinearGradient(
colors: [
Color(0xFF546486),
Color(0xFF394A68),
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
),
child: Container(
margin: const EdgeInsets.all(5.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.0),
gradient: const LinearGradient(
colors: [
Color(0xFF394A68),
Color(0xFF546486),
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
boxShadow: const [
BoxShadow(color: Color(0xFF394A68), blurRadius: 5.0),
],
),
child: Center(
child: Text(
value,
style: const TextStyle(
color: Color(0XFFBCC6DF),
fontSize: 30.0,
),
),
),
),
);
}
Это то, что я получил на данный момент, не стесняйтесь менять все, что хотите или нужно.
Текущий результат
Изображение

Ожидаемый результат
Изображение


Источник: https://stackoverflow.com/questions/781 ... in-flutter

Вернуться в «CSS»