fix some formatting issues (#28809)

* fix some formatting issues

* address review comments

* fix indent
This commit is contained in:
Alexandre Ardhuin
2019-03-06 09:37:32 +01:00
committed by GitHub
parent 01a29b85ef
commit 4c1f4d14e1
52 changed files with 278 additions and 240 deletions

View File

@@ -119,8 +119,10 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
final double maxHeight;
final Widget child;
@override double get minExtent => minHeight;
@override double get maxExtent => math.max(maxHeight, minHeight);
@override
double get minExtent => minHeight;
@override
double get maxExtent => math.max(maxHeight, minHeight);
@override
Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) {

View File

@@ -669,7 +669,7 @@ class Tab2ConversationRow extends StatelessWidget {
}
List<Widget> buildTab2Conversation() {
return <Widget>[
return <Widget>[
const Tab2ConversationRow(
text: "My Xanadu doesn't look right",
),

View File

@@ -8,9 +8,13 @@ import '../demo/all.dart';
import 'icons.dart';
class GalleryDemoCategory {
const GalleryDemoCategory._({ this.name, this.icon });
@required final String name;
@required final IconData icon;
const GalleryDemoCategory._({
@required this.name,
@required this.icon,
});
final String name;
final IconData icon;
@override
bool operator ==(dynamic other) {

View File

@@ -20,11 +20,11 @@ Future<void> endOfAnimation() async {
int iteration = 0;
class LifecycleObserver extends WidgetsBindingObserver {
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
debugPrint('==== MEMORY BENCHMARK ==== $state ====');
debugPrint('This was lifecycle event number $iteration in this instance');
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
debugPrint('==== MEMORY BENCHMARK ==== $state ====');
debugPrint('This was lifecycle event number $iteration in this instance');
}
}
Future<void> main() async {

View File

@@ -281,15 +281,15 @@ class IsolateExampleState extends State<StatefulWidget> with SingleTickerProvide
}
String _getStatus(CalculationState state) {
switch (state) {
case CalculationState.loading:
return 'Loading...';
case CalculationState.calculating:
return 'In Progress';
case CalculationState.idle:
default:
return 'Idle';
}
switch (state) {
case CalculationState.loading:
return 'Loading...';
case CalculationState.calculating:
return 'In Progress';
case CalculationState.idle:
default:
return 'Idle';
}
}
void _updateState(String result, double progress) {