Skip to content

Commit

Permalink
Fix UI chat wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev authored and hoangdat committed Oct 2, 2023
1 parent 2e26607 commit 4cca97c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 50 deletions.
80 changes: 42 additions & 38 deletions lib/widgets/twake_components/twake_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,47 +37,51 @@ class TwakeHeader extends StatelessWidget
padding: TwakeHeaderStyle.padding,
child: Row(
children: [
Expanded(
flex: TwakeHeaderStyle.flexActions,
child: Row(
children: [
InkWell(
onTap: onClearSelection,
borderRadius: BorderRadius.circular(
TwakeHeaderStyle.closeIconSize,
if (!TwakeHeaderStyle.isDesktop(context))
Expanded(
flex: TwakeHeaderStyle.flexActions,
child: Row(
children: [
InkWell(
onTap: onClearSelection,
borderRadius: BorderRadius.circular(
TwakeHeaderStyle.closeIconSize,
),
child: Icon(
Icons.close,
size: TwakeHeaderStyle.closeIconSize,
color: selectMode == SelectMode.select
? Theme.of(context)
.colorScheme
.onSurfaceVariant
: Colors.transparent,
),
),
child: Icon(
Icons.close,
size: TwakeHeaderStyle.closeIconSize,
color: selectMode == SelectMode.select
? Theme.of(context).colorScheme.onSurfaceVariant
: Colors.transparent,
ValueListenableBuilder(
valueListenable: conversationSelectionNotifier,
builder: (context, conversationSelection, _) {
return Padding(
padding:
TwakeHeaderStyle.counterSelectionPadding,
child: Text(
conversationSelection.length.toString(),
style: Theme.of(context)
.textTheme
.bodyLarge
?.copyWith(
color: selectMode == SelectMode.select
? Theme.of(context)
.colorScheme
.onSurfaceVariant
: Colors.transparent,
),
),
);
},
),
),
ValueListenableBuilder(
valueListenable: conversationSelectionNotifier,
builder: (context, conversationSelection, _) {
return Padding(
padding: TwakeHeaderStyle.counterSelectionPadding,
child: Text(
conversationSelection.length.toString(),
style: Theme.of(context)
.textTheme
.bodyLarge
?.copyWith(
color: selectMode == SelectMode.select
? Theme.of(context)
.colorScheme
.onSurfaceVariant
: Colors.transparent,
),
),
);
},
),
],
],
),
),
),
Expanded(
flex: TwakeHeaderStyle.flexTitle,
child: Align(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,15 @@ class TwakeLinkView extends StatelessWidget {
}

Widget _buildCleanRichText(BuildContext context) {
return Padding(
padding: TwakeLinkViewStyle.paddingCleanRichText,
child: TwakeCleanRichText(
text: text,
childWidget: childWidget,
textStyle: textStyle,
linkStyle: linkStyle,
textAlign: textAlign ?? TextAlign.start,
onLinkTap: onLinkTap,
maxLines: maxLines,
textSpanBuilder: textSpanBuilder,
),
return TwakeCleanRichText(
text: text,
childWidget: childWidget,
textStyle: textStyle,
linkStyle: linkStyle,
textAlign: textAlign ?? TextAlign.start,
onLinkTap: onLinkTap,
maxLines: maxLines,
textSpanBuilder: textSpanBuilder,
);
}
}

0 comments on commit 4cca97c

Please sign in to comment.