Files
tatuchat/lib/widgets/layouts/two_column_layout.dart
Welton Moura 0037b0b9cf
Some checks failed
Main Deploy Workflow / deploy_web (push) Has been cancelled
Main Deploy Workflow / deploy_playstore_internal (push) Has been cancelled
Close stale issues and PRs / stale (push) Has been cancelled
Initial commit
2026-09-11 15:59:56 -03:00

44 lines
1.2 KiB
Dart

// SPDX-FileCopyrightText: 2019-Present Christian Kußowski
// SPDX-FileCopyrightText: 2019-Present Contributors to FluffyChat
//
// SPDX-License-Identifier: AGPL-3.0-or-later
import 'package:tatchat/config/themes.dart';
import 'package:material_ui/material_ui.dart';
class TwoColumnLayout extends StatelessWidget {
final Widget mainView;
final Widget sideView;
final bool hasNavigationRail;
const TwoColumnLayout({
super.key,
required this.mainView,
required this.sideView,
this.hasNavigationRail = true,
});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return ScaffoldMessenger(
child: Scaffold(
body: Row(
children: [
Container(
clipBehavior: Clip.antiAlias,
decoration: const BoxDecoration(),
width:
FluffyThemes.columnWidth +
(hasNavigationRail ? FluffyThemes.navRailWidth : 0),
child: mainView,
),
Container(width: 1.0, color: theme.dividerColor),
Expanded(child: ClipRRect(child: sideView)),
],
),
),
);
}
}