Flutter Card Widget Example | Card Widget complete code in flutter

0

 Flutter Card Widget Example | Card Widget complete code in flutter







import 'package:flutter/material.dart';
class Cardwidget extends StatelessWidget{
  const Cardwidget({super.key});
   
  @override  
  Widget build(BuildContext context) {  
    return Scaffold(  
      appBar: AppBar(  
        title: Text("Welcome in Card Widget"),  
      ),  
      body: Center(  
        child: Container(
           width: 320,  
           height: 220,  
           padding: EdgeInsets.all(10.0),  
           child:Card(
            shape: RoundedRectangleBorder(  
            borderRadius: BorderRadius.circular(15.0),  
          ),  
          color: Colors.red,  
          elevation: 10,
          child: Column(
            mainAxisSize: MainAxisSize.min,  
            children:<Widget>[
               const ListTile(  
                leading: Icon(Icons.album, size: 60),  
                title: Text(  
                  'Sonu Nigam',  
                  style: TextStyle(fontSize: 30.0)  
                ),  
                subtitle: Text(  
                  'Best of Sonu Nigam Music.',  
                  style: TextStyle(fontSize: 18.0)  
                ),  
              ),
              Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
              ElevatedButton(
              child: const Text('Play'),
              onPressed: () {/* ... */},
              ),
            SizedBox(width: 8), // Adds some spacing between buttons
            ElevatedButton(
            child: const Text('Pause'),
             onPressed: () {/* ... */},
           ),
  ],
)

            ],
          )
            ),
        ),  
      ),  
    );  
  }  
}

Post a Comment

0Comments

POST Answer of Questions and ASK to Doubt

Post a Comment (0)