remove unuse codes

This commit is contained in:
appflowy 2022-02-01 11:29:11 +08:00
parent be806e301c
commit df5e178c6c
5 changed files with 19 additions and 112 deletions

View File

@ -2,7 +2,7 @@ import 'package:app_flowy/workspace/domain/edit_action/app_edit.dart';
import 'package:app_flowy/workspace/presentation/widgets/dialogs.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:expandable/expandable.dart';
import 'package:flowy_infra/flowy_icon_data_icons.dart';
import 'package:flowy_infra/icon_data.dart';
import 'package:flowy_infra/theme.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';

View File

@ -1,19 +0,0 @@
import 'package:flutter/cupertino.dart';
class ColorUtils {
static Color shiftHsl(Color c, [double amt = 0]) {
var hslc = HSLColor.fromColor(c);
return hslc.withLightness((hslc.lightness + amt).clamp(0.0, 1.0)).toColor();
}
static Color parseHex(String value) => Color(int.parse(value.substring(1, 7), radix: 16) + 0xFF000000);
static Color blend(Color dst, Color src, double opacity) {
return Color.fromARGB(
255,
(dst.red.toDouble() * (1.0 - opacity) + src.red.toDouble() * opacity).toInt(),
(dst.green.toDouble() * (1.0 - opacity) + src.green.toDouble() * opacity).toInt(),
(dst.blue.toDouble() * (1.0 - opacity) + src.blue.toDouble() * opacity).toInt(),
);
}
}

View File

@ -1,30 +0,0 @@
/// Flutter icons FlowyIconData
/// Copyright (C) 2021 by original authors @ fluttericon.com, fontello.com
/// This font was generated by FlutterIcon.com, which is derived from Fontello.
///
/// To use this font, place it in your fonts/ directory and include the
/// following in your pubspec.yaml
///
/// flutter:
/// fonts:
/// - family: FlowyIconData
/// fonts:
/// - asset: fonts/FlowyIconData.ttf
///
///
///
// ignore_for_file: constant_identifier_names
import 'package:flutter/widgets.dart';
class FlowyIconData {
FlowyIconData._();
static const _kFontFam = 'FlowyIconData';
static const String? _kFontPkg = null;
static const IconData drop_down_hide =
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData drop_down_show =
IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}

View File

@ -1,60 +0,0 @@
// ignore_for_file: non_constant_identifier_names
class _Strings {
static _Strings instance = _Strings();
String TITLE_CONTACTS_PAGE = "Contacts";
String TITLE_WHATS_HAPPENING = "What's happening this week?";
String TITLE_ADD_CONTACT = "Add Contact";
String TITLE_EDIT_CONTACT = "Edit Contact";
String BTN_OK = "Ok";
String BTN_CANCEL = "Cancel";
String BTN_SIGN_IN = "Sign In";
String BTN_SIGN_OUT = "Sign Out";
String BTN_COMPLETE = "Complete";
String BTN_SAVE = "Save";
String LBL_WELCOME = "Welcome!";
String LBL_NAME_FIRST = "First Name";
String LBL_NAME_MIDDLE = "Middle Name";
String LBL_NAME_LAST = "Last Name";
String LBL_STEP_X = "Step {0}";
String ERR_DEVICE_OAUTH_FAILED_TITLE = "Unable to connect to your account.";
String ERR_DEVICE_OAUTH_FAILED_MSG =
"Please make sure you've completed the sign-in process in your browser.";
String GOOGLE_OAUTH_TITLE = "GOOGLE SIGN-IN";
String GOOGLE_OAUTH_INSTRUCTIONS_1 =
"In order to import your Google Contacts, you'll need to authorize this application using your web browser.";
String GOOGLE_OAUTH_INSTRUCTIONS_2 =
"Copy this code to your clipboard by clicking the icon or selecting the text:";
String GOOGLE_OAUTH_INSTRUCTIONS_3 =
"Navigate to the following link in your web browser, and enter the above code:";
String GOOGLE_OAUTH_INSTRUCTIONS_4 =
"Press the button below when you've completed signup:";
}
_Strings get S => _Strings.instance;
extension AddSupplant on String {
String sup(
[dynamic v0,
dynamic v1,
dynamic v2,
dynamic v3,
dynamic v4,
dynamic v5,
dynamic v6]) {
var _s = this;
if (v0 != null) _s = _s.replaceAll("{0}", "$v0");
if (v1 != null) _s = _s.replaceAll("{1}", "$v1");
if (v2 != null) _s = _s.replaceAll("{2}", "$v2");
if (v3 != null) _s = _s.replaceAll("{3}", "$v3");
if (v4 != null) _s = _s.replaceAll("{4}", "$v4");
if (v5 != null) _s = _s.replaceAll("{5}", "$v5");
if (v6 != null) _s = _s.replaceAll("{6}", "$v6");
return _s;
}
}

View File

@ -1,4 +1,3 @@
import 'package:flowy_infra/color.dart';
import 'package:flutter/material.dart';
enum ThemeType {
@ -25,7 +24,6 @@ String themeTypeToString(ThemeType ty) {
//Color Pallettes
const _black = Color(0xff000000);
const _grey = Color(0xff808080);
const _white = Color(0xFFFFFFFF);
class AppTheme {
@ -185,3 +183,21 @@ class AppTheme {
Color shift(Color c, double d) => ColorUtils.shiftHsl(c, d * (isDark ? -1 : 1));
}
class ColorUtils {
static Color shiftHsl(Color c, [double amt = 0]) {
var hslc = HSLColor.fromColor(c);
return hslc.withLightness((hslc.lightness + amt).clamp(0.0, 1.0)).toColor();
}
static Color parseHex(String value) => Color(int.parse(value.substring(1, 7), radix: 16) + 0xFF000000);
static Color blend(Color dst, Color src, double opacity) {
return Color.fromARGB(
255,
(dst.red.toDouble() * (1.0 - opacity) + src.red.toDouble() * opacity).toInt(),
(dst.green.toDouble() * (1.0 - opacity) + src.green.toDouble() * opacity).toInt(),
(dst.blue.toDouble() * (1.0 - opacity) + src.blue.toDouble() * opacity).toInt(),
);
}
}