twibbon_mrh 0.0.3
twibbon_mrh: ^0.0.3 copied to clipboard
A Flutter package to create camera overlays with custom Twibbon frames – perfect for photo booths or campaign overlays!
import 'package:flutter/material.dart';
import 'package:twibbon_mrh/twibbon_mrh.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Example Twibbon_mrh',
theme: ThemeData(
scaffoldBackgroundColor: Colors.white,
useMaterial3: false,
primarySwatch: Colors.blue,
),
home: const HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Twibbon_mrh"),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Column(
children: [
const Text("Image from assets"),
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => const Twibbonizer(
imgAssets: 'assets/frame-example.png',
),
),
);
},
child: Card(
elevation: 4,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
clipBehavior: Clip.antiAlias,
child: Image.asset(
"assets/frame-example.png",
width: 200,
height: 200,
),
),
),
],
),
const SizedBox(height: 24),
Column(
children: [
const Text("Image from network"),
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => const Twibbonizer(
imgNetwork: 'https://short-link.me/146tf',
),
),
);
},
child: Card(
elevation: 4,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
clipBehavior: Clip.antiAlias,
child: const Image(
image: NetworkImage("https://short-link.me/146tf"),
width: 200,
height: 200,
),
),
),
],
),
],
),
),
);
}
}