Custom Widget

 import 'package:celloip/widget/rounded_btn_dart.dart';

import "package:flutter/material.dart";

void main() {
runApp(MyBar(),);
}
class MyBar extends StatelessWidget {
MyBar({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Custom Widgets",
theme: ThemeData(
primarySwatch: Colors.brown,
),
home: CustomWidget(),
);
}
}
class CustomWidget extends StatelessWidget {
CustomWidget({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Custom Widgets"),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: 100,
child: RoundedButton(
btnName: "Play",
icon: Icon(Icons.play_arrow,),
callBack: () {
print("Logged in!!");
},
// textStyle: mTextStyle16(),
),
),
SizedBox(height: 11,),
Container(
width: 100,
child: RoundedButton(
btnName: "Press",
callBack: () {
print("Logged in!!");
},
bgColor: Colors.orange,
),
),
],
),
),
);
}
}

Comments

Popular posts from this blog

Second GET API Calling with Bloc simple Example in Flutter

Stack Container Scrollable Card widget UI with Custom Widget

Pagination with Bloc Pattern in Flutter