bemeli_update 0.0.1 bemeli_update: ^0.0.1 copied to clipboard
update plugin for bemeli application.
example/lib/main.dart
import 'package:bemeli_update/controller/bemeli_update_controller.dart';
import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: Initial(),
);
}
}
class Initial extends StatefulWidget {
const Initial({Key? key}) : super(key: key);
@override
State<Initial> createState() => _InitialState();
}
class _InitialState extends State<Initial> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('bemeliUpdate'),
),
body: Stack(
children: [
Container(
height: 300,
color: const Color.fromARGB(255, 54, 15, 245),
),
Positioned.fill(
child: Lottie.asset(
'assets/lottie.json',
),
),
],
),
floatingActionButton: FloatingActionButton(
onPressed: (() => BemeliUpdate.init(
version: 1.0,
context: context,
baseURL: 'https://apiv2.bemeli.com/')),
child: const Icon(Icons.add),
));
}
}