mirror of
https://github.com/foss42/apidash.git
synced 2025-12-05 04:18:56 +08:00
61 lines
1.4 KiB
Dart
61 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:multi_split_view/multi_split_view.dart';
|
|
import '../components/components.dart';
|
|
import '../components/styles.dart';
|
|
|
|
class HomePage extends StatefulWidget {
|
|
const HomePage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
HomePageState createState() => HomePageState();
|
|
}
|
|
|
|
class HomePageState extends State<HomePage> {
|
|
final MultiSplitViewController _controller = MultiSplitViewController(
|
|
areas: [
|
|
Area(size: 300, minimalSize: 200),
|
|
Area(minimalWeight: 0.7),
|
|
],
|
|
);
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Column(
|
|
children: [
|
|
Expanded(
|
|
child: MultiSplitViewTheme(
|
|
data: MultiSplitViewThemeData(
|
|
dividerThickness: 4,
|
|
dividerPainter: DividerPainters.background(
|
|
color: colorGrey200,
|
|
highlightedColor: colorGrey400,
|
|
animationEnabled: false,
|
|
),
|
|
),
|
|
child: MultiSplitView(
|
|
controller: _controller,
|
|
children: const [
|
|
CollectionPane(),
|
|
RequestEditorPane(),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
_controller.dispose();
|
|
super.dispose();
|
|
}
|
|
}
|