| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- import 'package:flutter/material.dart';
- import 'title_point.dart';
- class Level2View extends StatelessWidget {
- const Level2View(
- {super.key,
- required this.level1,
- required this.level2,
- required this.level1Title,
- required this.level2Title,
- required this.level2SubTitle});
- final Iterable<Widget> level1;
- final Iterable<Widget> level2;
- final String level1Title;
- final String level2Title;
- final Widget level2SubTitle;
- @override
- Widget build(BuildContext context) {
- return Container(
- width: double.infinity,
- height: double.infinity,
- margin: const EdgeInsets.all(20),
- padding: const EdgeInsets.fromLTRB(12, 17, 12, 17),
- decoration: BoxDecoration(
- color: Colors.white, borderRadius: BorderRadius.circular(16)),
- child: Row(
- children: [
- SizedBox(width: 260, height: double.infinity, child: left(context)),
- const VerticalDivider(
- width: 15, color: Color(0xffd8d8d8), thickness: 1),
- Expanded(child: right(context))
- ],
- ),
- );
- }
- TextStyle get titleStyle => const TextStyle(
- fontSize: 14.22, color: Color(0xff333333), fontWeight: FontWeight.w700);
- Widget left(BuildContext context) {
- return Column(
- children: [
- Row(
- children: [
- const Padding(padding: EdgeInsets.all(8), child: TitlePoint()),
- Text(level1Title, style: titleStyle),
- const Spacer(),
- Container(
- decoration: BoxDecoration(
- border: Border.all(color: const Color(0xffe3e3e3))),
- child: const Text('2023-06-26'),
- )
- ],
- ),
- const SizedBox(height: 20),
- Expanded(
- child: ListView(
- children: level1.toList(),
- )),
- ],
- );
- }
- Widget right(BuildContext context) {
- return Column(
- children: [
- Row(
- children: [
- const Padding(padding: EdgeInsets.all(8), child: TitlePoint()),
- Text(level2Title, style: titleStyle),
- level2SubTitle,
- ],
- ),
- Expanded(
- child: Padding(
- padding: const EdgeInsets.all(18),
- child: Column(
- children: level2.toList(),
- )))
- ],
- );
- }
- }
|