solucx_widget 1.0.0
solucx_widget: ^1.0.0 copied to clipboard
SoluCXWidget is a Flutter widget that allows you to integrate SoluCX functionalities into your Flutter application.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'views/bottom_view.dart';
import 'views/inline_view.dart';
import 'views/modal_view.dart';
import 'views/top_view.dart';
void main() async {
await dotenv.load(fileName: ".env");
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHomePage(
title: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.network(
'https://biblioteca.solucx.com.br/wp-content/uploads/2021/01/logo-solucx.png',
height: 40,
colorBlendMode: BlendMode.darken,
),
SizedBox(width: 10),
Text("SoluCX Widget",
style: TextStyle(fontSize: 20, color: Colors.white)),
],
),
),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key, required this.title});
final Widget title;
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 4,
child: Scaffold(
appBar: AppBar(
backgroundColor: Color.fromARGB(255, 50, 115, 153),
title: title,
bottom: TabBar(
indicatorColor: Colors.white,
labelColor: Colors.white,
unselectedLabelColor: Colors.grey,
tabs: [
Tab(icon: Icon(Icons.line_axis), text: 'Inline'),
Tab(icon: Icon(Icons.border_bottom), text: 'Bottom'),
Tab(icon: Icon(Icons.border_top), text: 'Top'),
Tab(icon: Icon(Icons.window), text: 'Modal'),
],
),
),
body: TabBarView(
children: [
InlineView(),
BottomView(),
TopView(),
ModalView(),
],
),
),
);
}
}