💄 Optimize designs
This commit is contained in:
		| @@ -1,3 +1,4 @@ | |||||||
|  | import 'package:flutter/foundation.dart'; | ||||||
| import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||||
| import 'package:google_fonts/google_fonts.dart'; | import 'package:google_fonts/google_fonts.dart'; | ||||||
| import 'package:latext/latext.dart'; | import 'package:latext/latext.dart'; | ||||||
| @@ -104,7 +105,12 @@ class _CalculatorHomePageState extends State<CalculatorHomePage> { | |||||||
|                       floatingLabelAlignment: FloatingLabelAlignment.center, |                       floatingLabelAlignment: FloatingLabelAlignment.center, | ||||||
|                       hintText: '例如: 2x^2 - 8x + 6 = 0', |                       hintText: '例如: 2x^2 - 8x + 6 = 0', | ||||||
|                     ), |                     ), | ||||||
|                     keyboardType: TextInputType.number, |                     keyboardType: kIsWeb | ||||||
|  |                         ? TextInputType.numberWithOptions( | ||||||
|  |                             signed: true, | ||||||
|  |                             decimal: true, | ||||||
|  |                           ) | ||||||
|  |                         : TextInputType.number, | ||||||
|                     onSubmitted: (_) => _solveEquation(), |                     onSubmitted: (_) => _solveEquation(), | ||||||
|                   ), |                   ), | ||||||
|                 ), |                 ), | ||||||
| @@ -241,13 +247,13 @@ class _CalculatorHomePageState extends State<CalculatorHomePage> { | |||||||
|     return Material( |     return Material( | ||||||
|       elevation: 8, |       elevation: 8, | ||||||
|       child: Padding( |       child: Padding( | ||||||
|         padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12), |         padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 8), | ||||||
|         child: Column( |         child: Column( | ||||||
|           mainAxisSize: MainAxisSize.min, |           mainAxisSize: MainAxisSize.min, | ||||||
|           children: [ |           children: [ | ||||||
|             Row( |             Row( | ||||||
|               mainAxisAlignment: MainAxisAlignment.spaceEvenly, |               mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||||||
|               spacing: 16, |               spacing: 8, | ||||||
|               children: [ |               children: [ | ||||||
|                 Expanded( |                 Expanded( | ||||||
|                   child: Tooltip( |                   child: Tooltip( | ||||||
| @@ -299,7 +305,7 @@ class _CalculatorHomePageState extends State<CalculatorHomePage> { | |||||||
|             const SizedBox(height: 8), |             const SizedBox(height: 8), | ||||||
|             Row( |             Row( | ||||||
|               mainAxisAlignment: MainAxisAlignment.spaceEvenly, |               mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||||||
|               spacing: 16, |               spacing: 8, | ||||||
|               children: [ |               children: [ | ||||||
|                 Expanded( |                 Expanded( | ||||||
|                   child: Tooltip( |                   child: Tooltip( | ||||||
| @@ -357,18 +363,19 @@ class _CalculatorHomePageState extends State<CalculatorHomePage> { | |||||||
|                 ), |                 ), | ||||||
|               ], |               ], | ||||||
|             ), |             ), | ||||||
|             const SizedBox(height: 8), |             if (!kIsWeb) const SizedBox(height: 8), | ||||||
|             Row( |             if (!kIsWeb) | ||||||
|               children: [ |               Row( | ||||||
|                 Expanded( |                 children: [ | ||||||
|                   child: FilledButton.icon( |                   Expanded( | ||||||
|                     icon: const Icon(Icons.keyboard_hide), |                     child: FilledButton.icon( | ||||||
|                     onPressed: () => _focusNode.unfocus(), |                       icon: const Icon(Icons.keyboard_hide), | ||||||
|                     label: Text('收起键盘'), |                       onPressed: () => _focusNode.unfocus(), | ||||||
|  |                       label: Text('收起键盘'), | ||||||
|  |                     ), | ||||||
|                   ), |                   ), | ||||||
|                 ), |                 ], | ||||||
|               ], |               ), | ||||||
|             ), |  | ||||||
|           ], |           ], | ||||||
|         ), |         ), | ||||||
|       ), |       ), | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev | |||||||
| # 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 | ||||||
| # In Windows, build-name is used as the major, minor, and patch parts | # In Windows, build-name is used as the major, minor, and patch parts | ||||||
| # of the product and file versions while build-number is used as the build suffix. | # of the product and file versions while build-number is used as the build suffix. | ||||||
| version: 1.0.0+1 | version: 1.0.0+2 | ||||||
|  |  | ||||||
| environment: | environment: | ||||||
|   sdk: ^3.9.2 |   sdk: ^3.9.2 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user