coloredcontainer 0.0.2
coloredcontainer: ^0.0.2 copied to clipboard
This package wraps any flutter widget inside the container with specified colors.
import 'package:flutter/material.dart';
import 'package:coloredcontainer/coloredcontainer.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Local Pacakges',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
child: ColoredContainer(
child: Text("Some text data"),
),
),
);
}
}
copied to clipboard