feat: added editor settings
This commit is contained in:
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user