Skip to content

Commit

Permalink
opt.: chat view
Browse files Browse the repository at this point in the history
  • Loading branch information
lollipopkit committed Jun 6, 2024
1 parent 2974f3a commit a29fe6a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
31 changes: 15 additions & 16 deletions lib/view/page/home/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ class _ChatPageState extends State<_ChatPage>
onLongPress: () {
final funcs = _buildChatItemFuncs(chatItems, chatItem);
context.showRoundDialog(
contentPadding: const EdgeInsets.all(11),
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
child: Column(
mainAxisSize: MainAxisSize.min,
children: funcs,
),
Expand Down Expand Up @@ -184,6 +184,12 @@ class _ChatPageState extends State<_ChatPage>
'code': CodeElementBuilder(onCopy: _onCopy),
'latex': LatexElementBuilder(),
},
styleSheet: MarkdownStyleSheet.fromTheme(Theme.of(context)).copyWith(
codeblockDecoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(7),
),
),
extensionSet: MarkdownUtils.extensionSet,
onTapLink: MarkdownUtils.onLinkTap,
shrinkWrap: false,
Expand Down Expand Up @@ -256,20 +262,13 @@ class _ChatPageState extends State<_ChatPage>
context.pop();
onTap();
},
child: SizedBox(
width: 77,
height: 77,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
UIs.height7,
Icon(icon, size: 20),
UIs.height7,
Text(text),
],
),
),
child: Row(
children: [
Icon(icon, size: 20),
const SizedBox(width: 27),
Text(text, style: const TextStyle(fontSize: 16.5)),
],
).paddingSymmetric(horizontal: 23, vertical: 15),
);
}

Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: "v1.0.34"
resolved-ref: f6acb6530649e4bb080496368d192dc92687ec85
ref: "v1.0.35"
resolved-ref: c3ae00b1ce84484d43d35a71e2ed2f3bd8d4c3bb
url: "https://github.com/lppcg/fl_lib"
source: git
version: "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies:
fl_lib:
git:
url: https://github.com/lppcg/fl_lib
ref: v1.0.34
ref: v1.0.35
# path: ../fl_lib
extended_image: ^8.2.1
app_links: ^6.1.1
Expand Down

0 comments on commit a29fe6a

Please sign in to comment.