Created project base structure, state management, router and login
This commit is contained in:
18
lib/constants/colors.dart
Normal file
18
lib/constants/colors.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:my_linkding/constants/linkding_color.dart';
|
||||
|
||||
const List<MaterialColor> colors = [
|
||||
linkdingColor,
|
||||
Colors.red,
|
||||
Colors.green,
|
||||
Colors.blue,
|
||||
Colors.yellow,
|
||||
Colors.orange,
|
||||
Colors.brown,
|
||||
Colors.cyan,
|
||||
Colors.purple,
|
||||
Colors.pink,
|
||||
Colors.deepOrange,
|
||||
Colors.indigo,
|
||||
];
|
||||
3
lib/constants/enums.dart
Normal file
3
lib/constants/enums.dart
Normal file
@@ -0,0 +1,3 @@
|
||||
enum LoadStatus { loading, loaded, error }
|
||||
|
||||
enum ConnectionMethod { http, https }
|
||||
3
lib/constants/global_keys.dart
Normal file
3
lib/constants/global_keys.dart
Normal file
@@ -0,0 +1,3 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
final scaffoldMessengerGlobalKey = GlobalKey<ScaffoldMessengerState>();
|
||||
16
lib/constants/linkding_color.dart
Normal file
16
lib/constants/linkding_color.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
const Map<int, Color> swatch = {
|
||||
50: Color.fromRGBO(87, 85, 217, .1),
|
||||
100: Color.fromRGBO(87, 85, 217, .2),
|
||||
200: Color.fromRGBO(87, 85, 217, .3),
|
||||
300: Color.fromRGBO(87, 85, 217, .4),
|
||||
400: Color.fromRGBO(87, 85, 217, .5),
|
||||
500: Color.fromRGBO(87, 85, 217, .6),
|
||||
600: Color.fromRGBO(87, 85, 217, .7),
|
||||
700: Color.fromRGBO(87, 85, 217, .8),
|
||||
800: Color.fromRGBO(87, 85, 217, .9),
|
||||
900: Color.fromRGBO(87, 85, 217, 1),
|
||||
};
|
||||
|
||||
const MaterialColor linkdingColor = MaterialColor(0xff5755d9, swatch);
|
||||
6
lib/constants/regexp.dart
Normal file
6
lib/constants/regexp.dart
Normal file
@@ -0,0 +1,6 @@
|
||||
class Regexps {
|
||||
static final url =
|
||||
RegExp(r'/https?:\/\/(?:www\.)?([-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b)*(\/[\/\d\w\.-]*)*(?:[\?])*(.+)*/gi');
|
||||
static final ipAddress = RegExp(r'^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}$');
|
||||
static final domain = RegExp(r'^(([a-z0-9|-]+\.)*[a-z0-9|-]+\.[a-z]+)$');
|
||||
}
|
||||
Reference in New Issue
Block a user