cowpay 0.0.3 cowpay: ^0.0.3 copied to clipboard
This document is a guide to the example project included in the plugin files. In addition, following the below steps will help you learn how to add and use (Cowpay plugin) in your flutter application..
import 'package:flutter/material.dart';
import 'cowpay_example.dart';
void main() {
runApp(const MaterialApp(
home: MyApp(),
));
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Cowpay'),
centerTitle: true,
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: const EdgeInsets.only(top: 20),
width: 300,
child: ElevatedButton(
onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => CowpayExample())),
child: const Text('Launch Cowpay')),
),
],
),
),
);
}
}