Dynamic column width splitview

This commit is contained in:
Juan Gilsanz Polo 2023-05-04 01:45:08 +02:00
parent b8d2ee9e0d
commit dafff9b242
5 changed files with 14 additions and 11 deletions

View file

@ -219,7 +219,6 @@ class _AddedListState extends State<AddedList> {
: null,
loadingGenerator: () => SizedBox(
width: double.maxFinite,
height: MediaQuery.of(context).size.height-171,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@ -251,12 +250,15 @@ class _AddedListState extends State<AddedList> {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
AppLocalizations.of(context)!.noClientsList,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 24,
color: Theme.of(context).colorScheme.onSurfaceVariant,
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
AppLocalizations.of(context)!.noClientsList,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 24,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
),
const SizedBox(height: 30),
@ -270,7 +272,6 @@ class _AddedListState extends State<AddedList> {
),
errorGenerator: () => SizedBox(
width: double.maxFinite,
height: MediaQuery.of(context).size.height-171,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,

View file

@ -173,6 +173,7 @@ class _ClientsWidgetState extends State<ClientsWidget> with TickerProviderStateM
if (width > 900) {
return SplitView.material(
hideDivider: true,
flexWidth: const FlexWidth(mainViewFlexWidth: 1, secondaryViewFlexWidth: 2),
placeholder: Center(
child: Padding(
padding: const EdgeInsets.all(24),

View file

@ -40,6 +40,7 @@ class Settings extends StatelessWidget {
if (width > 900) {
return SplitView.material(
hideDivider: true,
flexWidth: const FlexWidth(mainViewFlexWidth: 1, secondaryViewFlexWidth: 2),
placeholder: Center(
child: Padding(
padding: const EdgeInsets.all(24),

View file

@ -295,8 +295,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: hide-divider
resolved-ref: e22dd0bf64e7d61a64eb99fcd9a4e111e177ccf3
ref: master-alt
resolved-ref: a6aa2419243cc0abccf9474ce340790d6c0ded6f
url: "https://github.com/JGeek00/flutter_split_view"
source: git
version: "0.1.2"

View file

@ -63,7 +63,7 @@ dependencies:
flutter_split_view:
git:
url: https://github.com/JGeek00/flutter_split_view
ref: hide-divider
ref: master-alt
url_launcher: ^6.1.10
dev_dependencies: