Improved visual differences when uploading, improved visuals in bottom tab bar, updated dependencies and removed deprecation warnings for some buttons, released 1.2.1+7
This commit is contained in:
parent
e623cef713
commit
ad10edffd7
10 changed files with 78 additions and 64 deletions
|
@ -1,6 +1,12 @@
|
||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
## 1.1.0+6
|
## 1.2.1+7
|
||||||
|
* Improve visual differences between the Upload tab and the upload button
|
||||||
|
* Improved visuals in bottom tab bar
|
||||||
|
* Updated dependencies and build with Flutter > 2 for the first time
|
||||||
|
* Updated to new button styles for New Material theme proposed by Google
|
||||||
|
|
||||||
|
## 1.2.0+6
|
||||||
* Only copy multipaste link if multi box checked
|
* Only copy multipaste link if multi box checked
|
||||||
* Add copy to clipboard shortcut in history view
|
* Add copy to clipboard shortcut in history view
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,11 @@
|
||||||
"login": "Login",
|
"login": "Login",
|
||||||
"history": "History",
|
"history": "History",
|
||||||
"profile": "Profile",
|
"profile": "Profile",
|
||||||
"upload": "Upload"
|
"upload": "New"
|
||||||
},
|
},
|
||||||
"upload": {
|
"upload": {
|
||||||
"open_file_explorer": "Select...",
|
"and_or": "and/or",
|
||||||
|
"open_file_explorer": "Select file(s)...",
|
||||||
"clear_temporary_files": "Clear",
|
"clear_temporary_files": "Clear",
|
||||||
"text_to_be_pasted": "Text...",
|
"text_to_be_pasted": "Text...",
|
||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
|
@ -33,7 +34,7 @@
|
||||||
"file_explorer_open": "Selecting files...",
|
"file_explorer_open": "Selecting files...",
|
||||||
"uploaded": "Uploaded! Copied links to clipboard.",
|
"uploaded": "Uploaded! Copied links to clipboard.",
|
||||||
"dismiss": "Dismiss",
|
"dismiss": "Dismiss",
|
||||||
"multipaste": "multipaste",
|
"multipaste": "Combine to a multipaste upload",
|
||||||
"errors": {
|
"errors": {
|
||||||
"not_found": "Not found",
|
"not_found": "Not found",
|
||||||
"retrieval_intent": "An error occurred while retrieving shared data"
|
"retrieval_intent": "An error occurred while retrieving shared data"
|
||||||
|
|
|
@ -31,7 +31,7 @@ class _DialogManagerState extends State<DialogManager> {
|
||||||
List<Widget> actions = <Widget>[];
|
List<Widget> actions = <Widget>[];
|
||||||
|
|
||||||
if (request.buttonTitleDeny != null && request.buttonTitleDeny.isNotEmpty) {
|
if (request.buttonTitleDeny != null && request.buttonTitleDeny.isNotEmpty) {
|
||||||
Widget denyBtn = FlatButton(
|
Widget denyBtn = TextButton(
|
||||||
child: Text(request.buttonTitleDeny),
|
child: Text(request.buttonTitleDeny),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_dialogService.dialogComplete(DialogResponse(confirmed: false));
|
_dialogService.dialogComplete(DialogResponse(confirmed: false));
|
||||||
|
@ -40,7 +40,7 @@ class _DialogManagerState extends State<DialogManager> {
|
||||||
actions.add(denyBtn);
|
actions.add(denyBtn);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget confirmBtn = FlatButton(
|
Widget confirmBtn = TextButton(
|
||||||
child: Text(request.buttonTitleAccept),
|
child: Text(request.buttonTitleAccept),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_dialogService.dialogComplete(DialogResponse(confirmed: true));
|
_dialogService.dialogComplete(DialogResponse(confirmed: true));
|
||||||
|
|
|
@ -45,7 +45,7 @@ class HistoryView extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _render(HistoryModel model, String url, BuildContext context) {
|
Widget _render(HistoryModel model, String url, BuildContext context) {
|
||||||
List<Widget> cards = List<Widget>();
|
List<Widget> cards = [];
|
||||||
|
|
||||||
if (model.pastes.length > 0) {
|
if (model.pastes.length > 0) {
|
||||||
model.pastes.reversed.forEach((paste) {
|
model.pastes.reversed.forEach((paste) {
|
||||||
|
@ -75,13 +75,13 @@ class HistoryView extends StatelessWidget {
|
||||||
label: translate('history.copy_link.dismiss'),
|
label: translate('history.copy_link.dismiss'),
|
||||||
textColor: Colors.blue,
|
textColor: Colors.blue,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Scaffold.of(context).hideCurrentSnackBar();
|
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
content: Text(translate('history.copy_link.copied')),
|
content: Text(translate('history.copy_link.copied')),
|
||||||
duration: Duration(seconds: 10),
|
duration: Duration(seconds: 10),
|
||||||
);
|
);
|
||||||
Scaffold.of(context).showSnackBar(snackBar);
|
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -71,12 +71,7 @@ class _LoginViewState extends State<LoginView> {
|
||||||
usernameController: model.userNameController,
|
usernameController: model.userNameController,
|
||||||
passwordController: model.passwordController,
|
passwordController: model.passwordController,
|
||||||
),
|
),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(24),
|
|
||||||
),
|
|
||||||
padding: EdgeInsets.all(12),
|
|
||||||
color: primaryAccentColor,
|
|
||||||
child: Text(translate('login.button'), style: TextStyle(color: buttonForegroundColor)),
|
child: Text(translate('login.button'), style: TextStyle(color: buttonForegroundColor)),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
var loginSuccess = await model.login(
|
var loginSuccess = await model.login(
|
||||||
|
|
|
@ -57,16 +57,12 @@ class ProfileView extends StatelessWidget {
|
||||||
UIHelper.verticalSpaceMedium(),
|
UIHelper.verticalSpaceMedium(),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 25.0, right: 25.0),
|
padding: const EdgeInsets.only(left: 25.0, right: 25.0),
|
||||||
child: RaisedButton.icon(
|
child: ElevatedButton.icon(
|
||||||
icon: Icon(Icons.remove_red_eye, color: Colors.blue),
|
icon: Icon(Icons.remove_red_eye, color: Colors.blue),
|
||||||
label: Text(
|
label: Text(
|
||||||
translate('profile.reveal_api_key'),
|
translate('profile.reveal_api_key'),
|
||||||
style: TextStyle(color: buttonForegroundColor),
|
style: TextStyle(color: buttonForegroundColor),
|
||||||
),
|
),
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(24),
|
|
||||||
),
|
|
||||||
color: primaryAccentColor,
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
return model.revealApiKey(apiKey);
|
return model.revealApiKey(apiKey);
|
||||||
})),
|
})),
|
||||||
|
|
|
@ -18,7 +18,7 @@ class AnonymousTabBarState extends State<AnonymousTabBarView> with SingleTickerP
|
||||||
List<Widget> _tabPages = [LoginView()];
|
List<Widget> _tabPages = [LoginView()];
|
||||||
List<bool> _hasInit = [true];
|
List<bool> _hasInit = [true];
|
||||||
|
|
||||||
List<Widget> _tabsButton = [Tab(icon: Icon(Icons.person_outline), text: translate('tabs.login'))];
|
List<Widget> _tabsButton = [Tab(icon: Icon(Icons.person_outline, color: Colors.blue), text: translate('tabs.login'))];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
@ -49,6 +49,8 @@ class AnonymousTabBarState extends State<AnonymousTabBarView> with SingleTickerP
|
||||||
bottomNavigationBar: BottomAppBar(
|
bottomNavigationBar: BottomAppBar(
|
||||||
child: TabBar(
|
child: TabBar(
|
||||||
labelColor: primaryAccentColor,
|
labelColor: primaryAccentColor,
|
||||||
|
indicatorColor: Colors.blue,
|
||||||
|
indicatorWeight: 3.0,
|
||||||
tabs: _tabsButton,
|
tabs: _tabsButton,
|
||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
),
|
),
|
||||||
|
|
|
@ -50,24 +50,39 @@ class AuthenticatedTabBarState extends State<AuthenticatedTabBarView> with Singl
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double width = MediaQuery.of(context).size.width;
|
double width = MediaQuery.of(context).size.width;
|
||||||
double yourWidth = width / 3;
|
double yourWidth = width / 3;
|
||||||
double yourHeight = 70;
|
double yourHeight = 55;
|
||||||
|
|
||||||
List<Widget> _tabsButton = [
|
List<Widget> _tabsButton = [
|
||||||
Container(
|
Container(
|
||||||
width: yourWidth,
|
width: yourWidth,
|
||||||
height: yourHeight,
|
height: yourHeight,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Tab(icon: Icon(Icons.upload_rounded), text: translate('tabs.upload'))),
|
child: Tab(
|
||||||
|
icon: Icon(
|
||||||
|
Icons.upload_file,
|
||||||
|
color: _currentTabIndex == 0 ? Colors.blue : primaryAccentColor,
|
||||||
|
),
|
||||||
|
text: translate('tabs.upload'))),
|
||||||
Container(
|
Container(
|
||||||
width: yourWidth,
|
width: yourWidth,
|
||||||
height: yourHeight,
|
height: yourHeight,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Tab(icon: Icon(Icons.history), text: translate('tabs.history'))),
|
child: Tab(
|
||||||
|
icon: Icon(
|
||||||
|
Icons.history,
|
||||||
|
color: _currentTabIndex == 1 ? Colors.blue : primaryAccentColor,
|
||||||
|
),
|
||||||
|
text: translate('tabs.history'))),
|
||||||
Container(
|
Container(
|
||||||
width: yourWidth,
|
width: yourWidth,
|
||||||
height: yourHeight,
|
height: yourHeight,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Tab(icon: Icon(Icons.person), text: translate('tabs.profile'))),
|
child: Tab(
|
||||||
|
icon: Icon(
|
||||||
|
Icons.person,
|
||||||
|
color: _currentTabIndex == 2 ? Colors.blue : primaryAccentColor,
|
||||||
|
),
|
||||||
|
text: translate('tabs.profile'))),
|
||||||
];
|
];
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
@ -76,6 +91,8 @@ class AuthenticatedTabBarState extends State<AuthenticatedTabBarView> with Singl
|
||||||
child: TabBar(
|
child: TabBar(
|
||||||
indicatorSize: TabBarIndicatorSize.label,
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
labelColor: primaryAccentColor,
|
labelColor: primaryAccentColor,
|
||||||
|
indicatorColor: Colors.blue,
|
||||||
|
indicatorWeight: 3.0,
|
||||||
labelPadding: EdgeInsets.all(0),
|
labelPadding: EdgeInsets.all(0),
|
||||||
tabs: _tabsButton,
|
tabs: _tabsButton,
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
|
|
|
@ -59,49 +59,55 @@ class UploadView extends StatelessWidget {
|
||||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)),
|
border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)),
|
||||||
),
|
),
|
||||||
controller: model.pasteTextController)),
|
controller: model.pasteTextController)),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 10.0, bottom: 10.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [Text(translate('upload.and_or'))])),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 10.0, bottom: 10.0),
|
padding: const EdgeInsets.only(top: 10.0, bottom: 10.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
RaisedButton.icon(
|
ElevatedButton.icon(
|
||||||
icon: Icon(Icons.file_copy_sharp, color: Colors.blue),
|
icon: Icon(Icons.file_copy_sharp, color: Colors.blue),
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(24),
|
|
||||||
),
|
|
||||||
color: primaryAccentColor,
|
|
||||||
onPressed: () => model.openFileExplorer(),
|
onPressed: () => model.openFileExplorer(),
|
||||||
label: Text(
|
label: Text(
|
||||||
translate('upload.open_file_explorer'),
|
translate('upload.open_file_explorer'),
|
||||||
style: TextStyle(color: buttonForegroundColor),
|
style: TextStyle(color: buttonForegroundColor),
|
||||||
)),
|
)),
|
||||||
RaisedButton.icon(
|
ElevatedButton.icon(
|
||||||
icon: Icon(Icons.cancel, color: Colors.orange),
|
icon: Icon(Icons.cancel, color: Colors.orange),
|
||||||
onPressed: model.paths != null && model.paths.length > 0
|
onPressed: model.paths != null && model.paths.length > 0
|
||||||
? () => model.clearCachedFiles()
|
? () => model.clearCachedFiles()
|
||||||
: null,
|
: null,
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(24),
|
|
||||||
),
|
|
||||||
color: primaryAccentColor,
|
|
||||||
label: Text(
|
label: Text(
|
||||||
translate('upload.clear_temporary_files'),
|
translate('upload.clear_temporary_files'),
|
||||||
style: TextStyle(color: buttonForegroundColor),
|
style: TextStyle(color: buttonForegroundColor),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 10.0, bottom: 10.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Checkbox(
|
||||||
|
value: model.createMulti,
|
||||||
|
onChanged: (v) => model.toggleCreateMulti(),
|
||||||
|
),
|
||||||
|
Text(translate('upload.multipaste')),
|
||||||
|
])),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 10.0, bottom: 10.0),
|
padding: const EdgeInsets.only(top: 10.0, bottom: 10.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
RaisedButton.icon(
|
ElevatedButton.icon(
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(24),
|
|
||||||
),
|
|
||||||
color: primaryAccentColor,
|
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
Map<String, bool> items = await model.upload();
|
Map<String, bool> items = await model.upload();
|
||||||
|
|
||||||
|
@ -119,13 +125,13 @@ class UploadView extends StatelessWidget {
|
||||||
label: translate('upload.dismiss'),
|
label: translate('upload.dismiss'),
|
||||||
textColor: Colors.blue,
|
textColor: Colors.blue,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Scaffold.of(context).hideCurrentSnackBar();
|
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
content: Text(translate('upload.uploaded')),
|
content: Text(translate('upload.uploaded')),
|
||||||
duration: Duration(seconds: 10),
|
duration: Duration(seconds: 10),
|
||||||
);
|
);
|
||||||
Scaffold.of(context).showSnackBar(snackBar);
|
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -134,15 +140,6 @@ class UploadView extends StatelessWidget {
|
||||||
translate('upload.upload'),
|
translate('upload.upload'),
|
||||||
style: TextStyle(color: buttonForegroundColor),
|
style: TextStyle(color: buttonForegroundColor),
|
||||||
)),
|
)),
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Checkbox(
|
|
||||||
value: model.createMulti,
|
|
||||||
onChanged: (v) => model.toggleCreateMulti(),
|
|
||||||
),
|
|
||||||
Text(translate('upload.multipaste')),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
])),
|
])),
|
||||||
model.errorMessage != null && model.errorMessage.isNotEmpty
|
model.errorMessage != null && model.errorMessage.isNotEmpty
|
||||||
? (Padding(
|
? (Padding(
|
||||||
|
|
26
pubspec.yaml
26
pubspec.yaml
|
@ -11,7 +11,7 @@ description: A mobile client for FileBin.
|
||||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 1.2.0+6
|
version: 1.2.1+7
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.7.0 <3.0.0"
|
sdk: ">=2.7.0 <3.0.0"
|
||||||
|
@ -19,32 +19,32 @@ environment:
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
cupertino_icons: 1.0.0
|
cupertino_icons: 1.0.2
|
||||||
flutter_localizations:
|
flutter_localizations:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_translate: 1.6.0
|
flutter_translate: 1.6.0
|
||||||
provider: 4.3.3
|
provider: 4.3.3
|
||||||
provider_architecture: 1.1.1+1
|
provider_architecture: 1.1.1+1
|
||||||
get_it: 3.1.0 # major changes > 3
|
get_it: 3.1.0 # major changes > 3
|
||||||
logger: 0.9.4
|
logger: 1.0.0
|
||||||
shared_preferences: 0.5.12+4
|
shared_preferences: 2.0.5
|
||||||
http: 0.12.2
|
http: 0.12.2
|
||||||
json_annotation: 3.1.1
|
json_annotation: 3.1.1
|
||||||
validators: 2.0.0+1
|
validators: 2.0.1
|
||||||
flutter_linkify: 4.0.2
|
flutter_linkify: 4.1.0
|
||||||
url_launcher: 5.7.2
|
url_launcher: 5.7.10
|
||||||
expandable: 4.1.4
|
expandable: 4.1.4
|
||||||
share: 0.6.5+4
|
share: 0.6.5+4
|
||||||
file_picker: 2.1.6
|
file_picker: 2.1.7
|
||||||
clipboard: 0.1.2+8
|
clipboard: 0.1.3
|
||||||
receive_sharing_intent: 1.4.3
|
receive_sharing_intent: 1.4.5
|
||||||
permission_handler: 5.0.1+1
|
permission_handler: 5.1.0+2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
build_runner: 1.10.2
|
build_runner: 1.11.5
|
||||||
built_value_generator: 7.1.0
|
built_value_generator: 8.0.4
|
||||||
json_serializable: 3.5.1
|
json_serializable: 3.5.1
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
|
|
Loading…
Reference in a new issue