Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Flutter 3.3.0 + Upgrade lint package to 1.10.0 #63

Merged
merged 10 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [3.0.0] - 2022-09-12

- Upgrade to Flutter 3.3.0
- Upgrade lint package to 1.1.0

WieFel marked this conversation as resolved.
Show resolved Hide resolved
## [2.1.0] - 2022-06-20

### Changed
Expand Down
4 changes: 2 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 30
compileSdkVersion 31

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -36,7 +36,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.example"
minSdkVersion 16
targetSdkVersion 30
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
4 changes: 3 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:exported="true"
>
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
Expand Down
4 changes: 2 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ExamplePage extends StatelessWidget {

@override
Widget build(BuildContext context) {
final TinyColor tc = TinyColor(Colors.blue);
final TinyColor tc = TinyColor.fromColor(Colors.blue);

return Scaffold(
appBar: AppBar(
Expand Down
3 changes: 1 addition & 2 deletions lib/src/conversion.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import 'dart:math' as math;

import 'package:flutter/painting.dart' show Color, HSLColor, HSVColor;

import 'util.dart';
import 'package:tinycolor2/src/util.dart';

HSLColor rgbToHsl({
required double r,
Expand Down
3 changes: 1 addition & 2 deletions lib/src/extensions.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/painting.dart';

import 'tinycolor.dart';
import 'package:tinycolor2/src/tinycolor.dart';

/// Extends the Color class to allow direct TinyColor manipulation natively
extension TinyColorExtension on Color {
Expand Down
4 changes: 1 addition & 3 deletions lib/src/tinycolor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import 'dart:math' as math;

import 'package:flutter/painting.dart' show Color, HSLColor, HSVColor;
import 'package:pigment/pigment.dart';

import 'conversion.dart';
import 'util.dart';
import 'package:tinycolor2/src/util.dart';

class TinyColor {
final Color originalColor;
Expand Down
2 changes: 1 addition & 1 deletion lib/tinycolor2.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
library tinycolor2;

export 'src/extensions.dart';
export 'src/conversion.dart';
export 'src/extensions.dart';
export 'src/tinycolor.dart';
export 'src/util.dart';
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: tinycolor2
description: Flutter Color manipulation and conversion, ported from JS tinycolor2
version: 2.1.0
version: 3.0.0
homepage: https://github.com/TinyCommunity/tinycolor2

environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.12.0"
sdk: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0"

dependencies:
flutter:
sdk: flutter
lint: ^1.5.3
pigment: ^1.0.4

dev_dependencies:
flutter_test:
sdk: flutter
lint: ^1.10.0

flutter:
3 changes: 1 addition & 2 deletions test/tinycolor_test.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/painting.dart' show Color, HSLColor, HSVColor;

import 'package:flutter_test/flutter_test.dart';
import 'package:tinycolor2/tinycolor2.dart';

Expand Down Expand Up @@ -425,7 +424,7 @@ void main() {
"==",
() {
expect(
color!,
color,
TinyColor.fromColor(const Color(0xFFFFFFFF)),
);
},
Expand Down