Skip to content

Commit

Permalink
chore: Follow up sendfiledialog fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
krille-chan committed Nov 1, 2023
1 parent c8a3166 commit dd758e1
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions lib/pages/chat/send_file_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'package:flutter_gen/gen_l10n/l10n.dart';
Expand Down Expand Up @@ -98,12 +99,30 @@ class SendFileDialogState extends State<SendFileDialog> {
),
),
),
SwitchListTile.adaptive(
value: origImage,
contentPadding: EdgeInsets.zero,
onChanged: (v) => setState(() => origImage = v),
title: Text(L10n.of(context)!.sendOriginal),
subtitle: Text(sizeString),
const SizedBox(height: 16),
// Workaround for SwitchListTile.adaptive crashes in CupertinoDialog
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
CupertinoSwitch(
value: origImage,
onChanged: (v) => setState(() => origImage = v),
),
const SizedBox(width: 16),
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
L10n.of(context)!.sendOriginal,
style: const TextStyle(fontWeight: FontWeight.bold),
),
Text(sizeString),
],
),
),
],
),
],
);
Expand Down

0 comments on commit dd758e1

Please sign in to comment.