Сделал возможность переключаться между приложениями и добавлять новые приложения практически не меняя код
This commit is contained in:
28
lib/resources.dart
Normal file
28
lib/resources.dart
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user