Сделал возможность переключаться между приложениями и добавлять новые приложения практически не меняя код

This commit is contained in:
Ivan Murashov
2017-09-07 15:35:13 +03:00
parent 8d81fb185d
commit 361bcd48ce
22 changed files with 304 additions and 140 deletions

28
lib/resources.dart Normal file
View File

@@ -0,0 +1,28 @@
import 'package:flutter/material.dart';
class Resources {
static String getLogo(String app) {
return app == null ? null : 'assets/${app}_logo.png';
}
static String getSplash(String app) {
return 'assets/${app != null ? app : 'pip'}_splash.png';
}
static Color getPrimaryColor(String app) {
switch (app) {
case 'pip': return new Color(0xff008794);
case 'autobonus': return new Color(0xffeb0004);
default: return new Color(0xffffffff);
}
}
static Color getButtonColor(String app) {
switch (app) {
case 'pip': return new Color(0xfff49935);
case 'autobonus': return new Color(0xffeb0004);
default: return new Color(0xffffffff);
}
}
}