flutter

Linear Gradient Container

Widget getUIWidget() {
  return Container(
    width: double.infinity,
    height: double.infinity,
    decoration: BoxDecoration(
        gradient: LinearGradient(
      colors: [Colors.blue, Colors.green],
      begin: Alignment.topLeft,
      end: Alignment.bottomRight,
    )),
  );
}
Was this helpful?