onGenerateRoute: (context) {
if (authbloc!.state.value is Uninitialized) {
return MaterialPageRoute(
- builder: (context) => PveSplashScreen(),
+ builder: (context) => const PveSplashScreen(),
);
}
if (sharedPreferences.getBool('showWelcomeScreen') ?? true) {
return MaterialPageRoute(
- builder: (context) => PveWelcome(),
+ builder: (context) => const PveWelcome(),
);
}
//TODO add a wide layout option here when it's ready
child: ProxmoxLayoutBuilder(
builder: (context, layout) => layout != ProxmoxLayout.slim
- ? MainLayoutSlim()
- : MainLayoutSlim(),
+ ? const MainLayoutSlim()
+ : const MainLayoutSlim(),
),
),
);
return MaterialPageRoute(
settings: context,
builder: (context) {
- return NotFoundPage();
+ return const NotFoundPage();
},
);
}
return MaterialPageRoute(
settings: context,
builder: (context) {
- return NotFoundPage();
+ return const NotFoundPage();
},
);
},
if (snapshot.hasData) {
switch (snapshot.data) {
case 0:
- return MobileDashboard();
+ return const MobileDashboard();
break;
case 1:
- return MobileResourceOverview();
+ return const MobileResourceOverview();
break;
case 2:
Provider.of<PveAccessManagementBloc>(context)
.events
.add(LoadUsers());
- return MobileAccessManagement();
+ return const MobileAccessManagement();
break;
default:
),
onPressed: () => showDialog(
context: context,
- builder: (c) => PveSubscriptionAlertDialog(),
+ builder: (c) => const PveSubscriptionAlertDialog(),
),
),
Padding(
]);
}),
]),
- bottomNavigationBar: PveMobileBottomNavigationbar(),
+ bottomNavigationBar: const PveMobileBottomNavigationbar(),
);
}
}
onChanged: (filter) =>
rBloc.events.add(FilterResources(nameFilter: filter)),
),
- actions: <Widget>[AppBarFilterIconButton()],
+ actions: <Widget>[const AppBarFilterIconButton()],
),
body: ListView.separated(
itemCount: fResources.length,
);
},
),
- bottomNavigationBar: PveMobileBottomNavigationbar(),
+ bottomNavigationBar: const PveMobileBottomNavigationbar(),
)),
);
},
}),
]);
}),
- bottomNavigationBar: PveMobileBottomNavigationbar(),
+ bottomNavigationBar: const PveMobileBottomNavigationbar(),
),
);
}
import 'package:flutter/material.dart';
class ProxmoxColors {
- static final Color orange = const Color(0xFFE57000);
- static final Color black = const Color(0xFF000000);
- static final Color supportLightOrange = const Color(0xFFFF9100);
- static final Color supportBlue = const Color(0xFF00617F);
- static final Color supportDarkGrey = const Color(0xFF464D4D);
+ static const Color orange = Color(0xFFE57000);
+ static const Color black = Color(0xFF000000);
+ static const Color supportLightOrange = Color(0xFFFF9100);
+ static const Color supportBlue = Color(0xFF00617F);
+ static const Color supportDarkGrey = Color(0xFF464D4D);
// generated from material colors spec
- static final Color blue900 = const Color(0xFF003951);
- static final Color blue800 = const Color(0xFF004e69);
- static final Color blue700 =
- const Color(0xFF00617F); // actual proxmox support blue
- static final Color blue600 = const Color(0xFF1b7696);
- static final Color blue500 = const Color(0xFF2c85a8);
- static final Color blue400 = const Color(0xFF4e98b9);
- static final Color blue300 = const Color(0xFF6aaccb);
- static final Color blue200 = const Color(0xFF8cc5e2);
- static final Color blue100 = const Color(0xFFabdff7);
- static final Color blue50 = const Color(0xFFcdf4ff);
+ static const Color blue900 = Color(0xFF003951);
+ static const Color blue800 = Color(0xFF004e69);
+ static const Color blue700 = Color(0xFF00617F); // actual proxmox support blue
+ static const Color blue600 = Color(0xFF1b7696);
+ static const Color blue500 = Color(0xFF2c85a8);
+ static const Color blue400 = Color(0xFF4e98b9);
+ static const Color blue300 = Color(0xFF6aaccb);
+ static const Color blue200 = Color(0xFF8cc5e2);
+ static const Color blue100 = Color(0xFFabdff7);
+ static const Color blue50 = Color(0xFFcdf4ff);
// chosen with the values.js lib, but still needs to be weeded out and
// may get improved.
- static final Color grey = const Color(0xFF464D4D);
- static final Color greyTint20 = const Color(0xFF6b7171);
- static final Color greyTint40 = const Color(0xFF909494);
- static final Color greyTint60 = const Color(0xFFb5b8b8);
- static final Color greyTint80 = const Color(0xFFdadbdb);
- static final Color greyShade20 = const Color(0xFF383e3e);
- static final Color greyShade40 = const Color(0xFF2a2e2e);
- static final Color greyShade60 = const Color(0xFF1c1f1f);
- static final Color greyShade80 = const Color(0xFF0e0f0f);
+ static const Color grey = Color(0xFF464D4D);
+ static const Color greyTint20 = Color(0xFF6b7171);
+ static const Color greyTint40 = Color(0xFF909494);
+ static const Color greyTint60 = Color(0xFFb5b8b8);
+ static const Color greyTint80 = Color(0xFFdadbdb);
+ static const Color greyShade20 = Color(0xFF383e3e);
+ static const Color greyShade40 = Color(0xFF2a2e2e);
+ static const Color greyShade60 = Color(0xFF1c1f1f);
+ static const Color greyShade80 = Color(0xFF0e0f0f);
- static final Color supportGrey = const Color(0xFFABBABA);
- static final Color supportGreyTint25 = const Color(0xFFc0cbcb);
- static final Color supportGreyTint50 = const Color(0xFFd5dddd);
- static final Color supportGreyTint75 = const Color(0xFFeaeeee);
- static final Color supportGreyShade25 = const Color(0xFF808c8c);
- static final Color supportGreyShade50 = const Color(0xFF565d5d);
- static final Color supportGreyShade75 = const Color(0xFF2b2f2f);
+ static const Color supportGrey = Color(0xFFABBABA);
+ static const Color supportGreyTint25 = Color(0xFFc0cbcb);
+ static const Color supportGreyTint50 = Color(0xFFd5dddd);
+ static const Color supportGreyTint75 = Color(0xFFeaeeee);
+ static const Color supportGreyShade25 = Color(0xFF808c8c);
+ static const Color supportGreyShade50 = Color(0xFF565d5d);
+ static const Color supportGreyShade75 = Color(0xFF2b2f2f);
}
// ..style = PaintingStyle.fill
// ..color = Colors.green;
// canvas.drawCircle(Offset(x, y), seedRadius, paint);
- final icon = Icons.storage;
+ const icon = Icons.storage;
var builder = ui.ParagraphBuilder(
ui.ParagraphStyle(fontFamily: icon.fontFamily, fontSize: 60))
..addText(String.fromCharCode(icon.codePoint));
)
..events.add(LoadTasks()),
dispose: (context, bloc) => bloc.dispose(),
- child: PveTaskLog(),
+ child: const PveTaskLog(),
),
);
}
),
dispose: (context, PveTaskLogViewerBloc bloc) => bloc.dispose(),
)
- ], child: PveGuestMigrate()),
+ ], child: const PveGuestMigrate()),
);
}
init: PveTaskLogState.init(nodeID),
)..events.add(LoadTasks()),
dispose: (context, bloc) => bloc.dispose(),
- child: PveTaskLog(),
+ child: const PveTaskLog(),
),
),
);
)
..events.add(LoadTasks()),
dispose: (context, bloc) => bloc.dispose(),
- child: PveTaskLog(),
+ child: const PveTaskLog(),
),
);
}
),
dispose: (context, PveTaskLogViewerBloc bloc) => bloc.dispose(),
)
- ], child: PveGuestMigrate()),
+ ], child: const PveGuestMigrate()),
transitionsBuilder: (context, animation, secondaryAnimation, child) {
return ScaleTransition(
scale: Tween<double>(
crossAxisAlignment: widget.titleAlginment,
children: <Widget>[
Container(
- width: widget.titleWidth ?? null,
- padding: widget.titlePadding ?? null,
+ width: widget.titleWidth,
+ padding: widget.titlePadding,
child: ListTile(
leading: widget.icon,
title: Text(
actions: [
TextButton(
onPressed: () async {
- final url = 'https://www.proxmox.com/proxmox-ve/pricing';
+ const url = 'https://www.proxmox.com/proxmox-ve/pricing';
if (await canLaunch(url)) {
await launch(url);
} else {