jeweltry 0.0.28
jeweltry: ^0.0.28 copied to clipboard
is a powerful and easy-to-integrate Flutter package that enables virtual try-on experiences within any Flutter application. It allows developers to seamlessly embed real-time product visualization, he [...]
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: "XXX-XX_XXX-XX",
customerId: "XXX-XX_XXX-XX",
tryOnKey: "XXX-XX_XXX-XX"),
TryOnSingleProduct(
urlPrefix: "XXX-XX_XXX-XX",
customerId: "XXX_XXX_X",
tryOnKey: "key_KXFTz2Z9NgxsYyoI",
btnTxt: "Single Product TryOn",
productId: "XXX-XX_XXX-XX",
fromId: true,
),
TryOnSingleProduct(
urlPrefix: "XX_XXX",
customerId: "XXX_XXX_X",
tryOnKey: "XXX-XX_XXX-XX",
btnTxt: "Single Product TryOn",
productId: "XXX_XXX_X",
fromId: true,
),
TextBtn(
urlPrefix: "XX_XXX",
customerId: "XXX_XXX_X",
tryOnKey: "XXX-XX_XXX-XX"),
GridLabel(
urlPrefix: "XX_XXX",
customerId: "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",
customerId: "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),
),
),
],
),
),
);
}
}