Answers for "flutter radial gradient"

0

flutter radial gradient

import 'package:flutter/material.dart';    
void main() => runApp(MyApp());    
class MyApp extends StatelessWidget {    
  @override    
  Widget build(BuildContext context) {      
    return MaterialApp(        
      title: 'Welcome to Flutter',        
      home: RadialGradientApp(),      
      );    
  }  
}    
class RadialGradientApp extends StatelessWidget {    
  @override    
  Widget build(BuildContext context) {      
    return Scaffold(        
      appBar: AppBar(          
      title: Text('Flutter RadialGradient Tutorial by Woolha.com'),
      ),        
        body: Center(          
          child: Container(            
          decoration: BoxDecoration(              
          gradient:  RadialGradient(                
          colors: [                  
          Colors.red,                  
          Colors.blue,                
          ],              
          )            
          ),            
            child: Center(              
              child: Text(                'RadialGradient Example',
              style: TextStyle(                  
              color: Colors.white,                  
              fontSize: 36.0,                  
              fontWeight: FontWeight.bold,                
           		 ),              
               ),            
            ),          
          )        
        )      
     );    
  }  
}
Posted by: Guest on August-15-2021

Code answers related to "Dart"

Browse Popular Code Answers by Language