feat: added editor settings

This commit is contained in:
jideguru
2021-05-31 22:19:49 +01:00
parent 3e38746c0c
commit 666bd5f58a
9 changed files with 461 additions and 131 deletions

View File

@@ -1,5 +1,11 @@
import 'package:flutter/material.dart';
/// An extension that makes it easy to get Hex code
/// from [Color] and [MaterialColor]
extension ColorX on Color {
String toHexColorString() => '#${value.toRadixString(16).replaceAll('ff', '')}';
}
String toHexColorString() {
String hex = value.toRadixString(16).replaceAll('ff', '');
if(hex.isEmpty) hex = '000000';
return '#$hex';
}
}