totaljs_flutter 1.0.0 totaljs_flutter: ^1.0.0 copied to clipboard
flutter_package_template description
// Copyright (c) 2024, the UnitedShareLib project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:totaljs_flutter/total5.dart';
// Total.js OpenLogger Service
final logger = OpenLogger(
token: '0inqxmks65paqne22kwbtk3ep4760v',
url: 'https://log.unitedshare.app',
autoConfig: true,
);
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const App());
// OpenLogger Service Call
logger.log(type: 'Info', message: 'Total.js Flutter Demo App Started');
}
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Total.js Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const HomePage(),
);
}
}
class HomePage extends StatefulWidget {
const HomePage({Key? key}) : super(key: key);
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: UnitedShareAppBarWidget(
automaticallyImplyLeading: true,
title: const Text(
"Total.js",
style: TextStyle(color: Colors.white),
),
toolbarHeight: 56,
leadingWidth: 50,
centerTitle: true,
backgroundColor: Colors.blue,
statusBarColor: Colors.blueGrey,
elevation: 10,
shadowColor: Colors.black,
//sideMargin: 10,
shapeBorder: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(10),
bottomLeft: Radius.circular(10),
),
),
onBackButtonTapped: (BuildContext context) {},
),
);
}
}