jeweltry 0.0.20 copy "jeweltry: ^0.0.20" to clipboard
jeweltry: ^0.0.20 copied to clipboard

JewelTry package for flutter apps.

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:jeweltry/btn/single_btn.dart';
import 'package:jeweltry/plushvie_tryon.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(
      floatingActionButton: FloatingActionButton(
        onPressed: (){


          Navigator.push(context, CupertinoPageRoute(builder: (context)=>
              const PlushvieTryon(
                urlPrefix: "XX_XXX",
                customerId: "XX_XXX",
                sId: "",
                tryOnKey: "",
                userId: "",
                // fromId: true,
                // singleProduct: true,
                // productId: "",
              )));
        },
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
      body: SizedBox(
        width: size.width,
        height: size.height,
        child:  const Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
           TryonBtn(urlPrefix: "", customerId: "", tryOnKey: "",userId: "",),

            TryOnSingleProduct(urlPrefix: "XX_XXX", customerId: "XXX_XXX_X", tryOnKey: "XXX-XX_XXX-XX", productId: 'XX_XXX',btnTxt: "Single Product TryOn",fromId: true,userId: "XX_XXX",),
            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
              ),
            ),
            ),
          ],
        ),
      ),
    );

  }
}