TF-296 Fix download file on browser

This commit is contained in:
dab246
2022-03-03 13:54:23 +07:00
committed by Dat H. Pham
parent a24a4a2bfd
commit 7beebfebc8
19 changed files with 221 additions and 32 deletions
@@ -1,6 +1,7 @@
import 'package:core/core.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
typedef OnCancelDownloadActionClick = void Function();
@@ -57,13 +58,13 @@ class DownloadingFileDialogBuilder {
),
)),
actions: [
TextButton(
onPressed: () {
if (_onCancelDownloadActionClick != null) {
_onCancelDownloadActionClick!();
}},
child: Text(_actionText, style: TextStyle(fontSize: 17.0, color: AppColor.appColor)),
)
if (_actionText.isNotEmpty)
Padding(
padding: EdgeInsets.only(bottom: kIsWeb ? 16 : 0, top: kIsWeb ? 16 : 0),
child: TextButton(
onPressed: () => _onCancelDownloadActionClick?.call(),
child: Text(_actionText, style: TextStyle(fontSize: 17.0, color: AppColor.appColor)),
))
],
);
}