pokeball_widget 1.0.0+3 pokeball_widget: ^1.0.0+3 copied to clipboard
A Pokeball CustomPaint widget to draw a simple minimal pokeball.
import 'package:flutter/material.dart';
import 'package:pokeball_widget/pokeball_widget.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Builder(
builder: (context) => Scaffold(
body: Center(
// Squared container for the pokeball
child: SizedBox(
height: MediaQuery.of(context).size.width / 2,
width: MediaQuery.of(context).size.width / 2,
child: PokeBallWidget(
color: Theme.of(context).textTheme.bodyText2?.color ?? Colors.black,
),
),
),
),
),
);
}
}