jeweltry 0.0.9
jeweltry: ^0.0.9 copied to clipboard
JewelTry package for flutter apps.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:jeweltry/btn/single_btn.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: HomePage(),
);
}
}
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
State<HomePage> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
return Scaffold(
body: SizedBox(
width: size.width,
height: size.height,
child: const Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
TryonBtn(urlPrefix: "XX_XXX", userId: "XXX_XXX_X", tryOnKey: "XXX-XX_XXX-XX"),
TryOnSingleProduct(urlPrefix: "XX_XXX", userId: "XXX_XXX_X", tryOnKey: "XXX-XX_XXX-XX",btnTxt: "Single Product TryOn",productId: "XXX_XXX_X",fromId: true,),
TextBtn(urlPrefix: "XX_XXX", userId: "XXX_XXX_X", tryOnKey: "XXX-XX_XXX-XX"),
GridLabel(urlPrefix: "XX_XXX", userId: "XX_XXX_X_X", tryOnKey: "XX_XX_XX_XX_XX",btnColor: Colors.amber,padding: EdgeInsets.symmetric(horizontal: 8,vertical: 5),radius: 20,),
TryonBtn(
urlPrefix: "XX_XXX",
userId: "XX_XXX",
tryOnKey: "XXX-XX_XXX-XX",
isCustom: true,
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.only(topLeft: Radius.circular(20),bottomLeft: Radius.circular(20),bottomRight: Radius.circular(20))
),
child: Text(
"Custom Button",
style: TextStyle(
color: Colors.white
),
),
),
],
),
),
);
}
}