Answers for "flutter graidant color"

0

flutter graidant color

import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {  
	@override 
    Widget build(BuildContext context) { 
    	return MaterialApp(
        	title: 'Flutter Gradient Demo',
            home: Scaffold(
            	appBar: AppBar(
                	title: const Text('Flutter Gradient Demo'),
                    ),
                body: Center(
                	child: Container(
                    	decoration: BoxDecoration(
                        	gradient: LinearGradient(
                            	begin: Alignment.centerLeft,
                                end: Alignment.centerRight,
                                colors: [Colors.purple, Colors.blue]
                                )
                              )
                           )
                      	),
                    )
                  );
             }
     }
Posted by: Guest on August-09-2021

Browse Popular Code Answers by Language