Skip to content

Commit

Permalink
feat(newSearch): move style to file
Browse files Browse the repository at this point in the history
  • Loading branch information
drminh2807 authored and hoangdat committed Oct 31, 2023
1 parent 45fb2b5 commit 0f82700
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/pages/chat_adaptive_scaffold/chat_adaptive_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'dart:async';

import 'package:fluffychat/pages/chat/chat.dart';
import 'package:fluffychat/pages/chat/events/message/message_style.dart';
import 'package:fluffychat/pages/chat_adaptive_scaffold/chat_adaptive_scaffold_style.dart';
import 'package:fluffychat/pages/chat_search/chat_search.dart';
import 'package:fluffychat/utils/extension/value_notifier_extension.dart';
import 'package:fluffychat/utils/responsive/responsive_utils.dart';
Expand Down Expand Up @@ -89,10 +90,10 @@ class ChatAdaptiveScaffoldController extends State<ChatAdaptiveScaffold> {
key: AppAdaptiveScaffold.breakpointWebAndDesktopKey,
builder: (_) => Padding(
padding: showRightPanel
? const EdgeInsetsDirectional.only(end: 16)
? ChatAdaptiveScaffoldStyle.webPaddingRight
: EdgeInsets.zero,
child: ClipRRect(
borderRadius: BorderRadius.circular(16),
borderRadius: ChatAdaptiveScaffoldStyle.borderRadius,
child: body!,
),
),
Expand All @@ -115,7 +116,7 @@ class ChatAdaptiveScaffoldController extends State<ChatAdaptiveScaffold> {
): SlotLayout.from(
key: AppAdaptiveScaffold.breakpointWebAndDesktopKey,
builder: (_) => ClipRRect(
borderRadius: BorderRadius.circular(16),
borderRadius: ChatAdaptiveScaffoldStyle.borderRadius,
child: ChatSearch(
roomId: widget.roomId,
onBack: toggleRightPanel,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import 'package:flutter/material.dart';

class ChatAdaptiveScaffoldStyle {
static const webPaddingRight = EdgeInsetsDirectional.only(end: 16);
static final borderRadius = BorderRadius.circular(16);
}

0 comments on commit 0f82700

Please sign in to comment.