qz_ui_kit 0.0.4
qz_ui_kit: ^0.0.4 copied to clipboard
A new Flutter project.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:qz_ui_kit/helper/picker_image.dart';
import 'package:qz_ui_kit/widgets/custom_app_bar.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ScreenUtilInit(
designSize: Size(750, 1334),
allowFontScaling: false,
child: MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: ExamplePage()),
);
}
}
class ExamplePage extends StatefulWidget {
@override
_ExamplePageState createState() => _ExamplePageState();
}
class _ExamplePageState extends State<ExamplePage>
with SingleTickerProviderStateMixin {
TabController tabController;
@override
void initState() {
super.initState();
tabController = TabController(length: 2, vsync: this);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(title: '123'),
body: Container(
width: double.infinity,
height: double.infinity,
child: Column(
children: [
Container(
width: double.infinity,
height: 50.w,
color: Colors.white,
child: TabBar(
controller: tabController,
tabs: [Tab(text: 'tab1'), Tab(text: 'tab2')],
),
),
Expanded(
child: TabBarView(
controller: tabController,
children: [
Center(child: RaisedButton(child: Text('123'),onPressed: (){
pickerImage(context);
},)),
Center(child: Text('2')),
],
),
),
],
),
));
}
}