74 lines
1.8 KiB
Dart
74 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:remixicon/remixicon.dart';
|
|
|
|
///模块标题
|
|
class SuggestedTitle extends StatelessWidget {
|
|
const SuggestedTitle({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
margin: const EdgeInsets.only(top: 20, bottom: 5),
|
|
child: Opacity(
|
|
opacity: 0.6,
|
|
child: Row(
|
|
spacing: 20,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Container(
|
|
width: 15,
|
|
height: 1,
|
|
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
|
),
|
|
Text(
|
|
"额外建议",
|
|
style: Theme.of(context).textTheme.titleSmall,
|
|
),
|
|
Container(
|
|
width: 15,
|
|
height: 1,
|
|
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class SuggestedItem extends StatelessWidget {
|
|
final String title;
|
|
|
|
const SuggestedItem({super.key, required this.title});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
spacing: 10,
|
|
children: [
|
|
Transform.translate(
|
|
offset: const Offset(0, 5),
|
|
child: Icon(
|
|
RemixIcons.lightbulb_flash_fill,
|
|
color: Color(0xfff2a529),
|
|
size: 18,
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Opacity(
|
|
opacity: 0.5,
|
|
child: Text(
|
|
title,
|
|
style: Theme.of(context).textTheme.bodyMedium,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|