Skip to content

Commit

Permalink
Merge pull request #98 from wuba/fair_release_3.0
Browse files Browse the repository at this point in the history
Flutter 2.8.0 适配
  • Loading branch information
yancechen authored May 31, 2022
2 parents 12074ef + 579ee97 commit e56169f
Show file tree
Hide file tree
Showing 82 changed files with 18,578 additions and 309 deletions.
Binary file modified fair/android/src/main/jniLibs/arm64-v8a/libfairflutter.so
Binary file not shown.
Binary file modified fair/android/src/main/jniLibs/armeabi-v7a/libfairflutter.so
Binary file not shown.
Binary file modified fair/android/src/main/jniLibs/x86/libfairflutter.so
Binary file not shown.
Binary file modified fair/android/src/main/jniLibs/x86_64/libfairflutter.so
Binary file not shown.
2 changes: 1 addition & 1 deletion fair/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dev_dependencies:
# Switch to another stable flutter version
dependency_overrides:
fair_version:
path: ../../flutter_version/flutter_2_5_0
path: ../../flutter_version/flutter_2_8_0

#dependency_overrides:
# fair_version:
Expand Down
76 changes: 76 additions & 0 deletions flutter_version/flutter_2_8_0/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
build/

# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java

# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*

# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
pubspec.lock
10 changes: 10 additions & 0 deletions flutter_version/flutter_2_8_0/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: fba99f6cf9a14512e461e3122c8ddfaa25394e89
channel: unknown

project_type: package
13 changes: 13 additions & 0 deletions flutter_version/flutter_2_8_0/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Defines a default set of lint rules enforced for
# projects at Google. For details and rationale,
# see https://github.com/dart-lang/pedantic#enabled-lints.
include: package:pedantic/analysis_options.yaml

linter:
rules:
lowercase_with_underscores: false
prefer_single_quotes: false
deprecated_member_use: false
analyzer:
exclude:
- lib/src/widgets/all.dart
20 changes: 20 additions & 0 deletions flutter_version/flutter_2_8_0/autoImport
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
##################################################################
##
## Import package
##
##
## Author: Chaobin Wu
## Email : [email protected]
##
#################################################################
die() {
echo "$*"
exit 1
}
# fix import of $$p.dart
sed -i '' '11 i\
import "dart:math" as math;' "lib/src/widgets/\$\$p.dart"
# fix import of $$w.dart
sed -i '' '14 i\
part "../part/w.part.dart";' "lib/src/widgets/\$\$w.dart"
11 changes: 11 additions & 0 deletions flutter_version/flutter_2_8_0/lib/fair_version.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright (C) 2005-present, 58.com. All rights reserved.
* Use of this source code is governed by a BSD type license that can be
* found in the LICENSE file.
*/

export 'src/widgets/all.dart';
export 'src/widgets/version.dart';
export 'src/widgets/utils.dart';
export 'src/widgets/module.dart';
export 'src/fair_utf8.dart';
14 changes: 14 additions & 0 deletions flutter_version/flutter_2_8_0/lib/src/fair_utf8.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'dart:ffi';
import 'package:ffi/ffi.dart';

class FairUtf8 {

static String fromUtf8(Pointer<Utf8> data) {
return data.toDartString();
}

static dynamic toUtf8(String data) {
return data.toNativeUtf8();
}

}
21 changes: 21 additions & 0 deletions flutter_version/flutter_2_8_0/lib/src/part/c.part.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright (C) 2005-present, 58.com. All rights reserved.
* Use of this source code is governed by a BSD type license that can be
* found in the LICENSE file.
*/


import 'package:flutter/cupertino.dart';

const defaultThickness = CupertinoScrollbar.defaultThickness;
const defaultThicknessWhileDragging =
CupertinoScrollbar.defaultThicknessWhileDragging;
const defaultRadius = CupertinoScrollbar.defaultRadius;
const defaultRadiusWhileDragging =
CupertinoScrollbar.defaultRadiusWhileDragging;
const EdgeInsetsDirectional _kDefaultInsetGroupedRowsMargin =
EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 20.0, 10.0);
const TextStyle _kDefaultPlaceholderStyle = TextStyle(
fontWeight: FontWeight.w400,
color: CupertinoColors.placeholderText,
);
9 changes: 9 additions & 0 deletions flutter_version/flutter_2_8_0/lib/src/part/w.part.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (C) 2005-present, 58.com. All rights reserved.
* Use of this source code is governed by a BSD type license that can be
* found in the LICENSE file.
*/
part of '../widgets/\$\$w.dart';
// int _kDefaultSemanticIndexCallback(Widget _, int localIndex) => localIndex;
const Duration _kScrollbarFadeDuration = Duration(milliseconds: 300);
const Duration _kScrollbarTimeToFade = Duration(milliseconds: 600);
143 changes: 143 additions & 0 deletions flutter_version/flutter_2_8_0/lib/src/widgets/$$a.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
// This file is generated by Fair, do not edit manually!

import 'package:flutter/material.dart';
import 'utils.dart';

var p = () => {
'AnimationBehavior': {
'values': AnimationBehavior.values,
'normal': AnimationBehavior.normal,
'preserve': AnimationBehavior.preserve,
},
'CatmullRomCurve.validateControlPoints': (props) =>
CatmullRomCurve.validateControlPoints(
props['pa'][0],
tension: props['tension']?.toDouble() ?? 0.0,
reasons: as(props['reasons']),
),
'Curves': {
'linear': Curves.linear,
'decelerate': Curves.decelerate,
'fastLinearToSlowEaseIn': Curves.fastLinearToSlowEaseIn,
'ease': Curves.ease,
'easeIn': Curves.easeIn,
'easeInToLinear': Curves.easeInToLinear,
'easeInSine': Curves.easeInSine,
'easeInQuad': Curves.easeInQuad,
'easeInCubic': Curves.easeInCubic,
'easeInQuart': Curves.easeInQuart,
'easeInQuint': Curves.easeInQuint,
'easeInExpo': Curves.easeInExpo,
'easeInCirc': Curves.easeInCirc,
'easeInBack': Curves.easeInBack,
'easeOut': Curves.easeOut,
'linearToEaseOut': Curves.linearToEaseOut,
'easeOutSine': Curves.easeOutSine,
'easeOutQuad': Curves.easeOutQuad,
'easeOutCubic': Curves.easeOutCubic,
'easeOutQuart': Curves.easeOutQuart,
'easeOutQuint': Curves.easeOutQuint,
'easeOutExpo': Curves.easeOutExpo,
'easeOutCirc': Curves.easeOutCirc,
'easeOutBack': Curves.easeOutBack,
'easeInOut': Curves.easeInOut,
'easeInOutSine': Curves.easeInOutSine,
'easeInOutQuad': Curves.easeInOutQuad,
'easeInOutCubic': Curves.easeInOutCubic,
'easeInOutCubicEmphasized': Curves.easeInOutCubicEmphasized,
'easeInOutQuart': Curves.easeInOutQuart,
'easeInOutQuint': Curves.easeInOutQuint,
'easeInOutExpo': Curves.easeInOutExpo,
'easeInOutCirc': Curves.easeInOutCirc,
'easeInOutBack': Curves.easeInOutBack,
'fastOutSlowIn': Curves.fastOutSlowIn,
'slowMiddle': Curves.slowMiddle,
'bounceIn': Curves.bounceIn,
'bounceOut': Curves.bounceOut,
'bounceInOut': Curves.bounceInOut,
'elasticIn': Curves.elasticIn,
'elasticOut': Curves.elasticOut,
'elasticInOut': Curves.elasticInOut,
},
'AnimationStatus': {
'values': AnimationStatus.values,
'dismissed': AnimationStatus.dismissed,
'forward': AnimationStatus.forward,
'reverse': AnimationStatus.reverse,
'completed': AnimationStatus.completed,
},
'FontWeight': {
'w100': FontWeight.w100,
'w200': FontWeight.w200,
'w300': FontWeight.w300,
'w400': FontWeight.w400,
'w500': FontWeight.w500,
'w600': FontWeight.w600,
'w700': FontWeight.w700,
'w800': FontWeight.w800,
'w900': FontWeight.w900,
'normal': FontWeight.normal,
'bold': FontWeight.bold,
'values': FontWeight.values,
},
'FontWeight.lerp': (props) => FontWeight.lerp(
props['pa'][0],
props['pa'][1],
props['pa'][2]?.toDouble(),
),
'TextDecoration': {
'none': TextDecoration.none,
'underline': TextDecoration.underline,
'overline': TextDecoration.overline,
'lineThrough': TextDecoration.lineThrough,
},
'TextRange': {
'empty': TextRange.empty,
},
'FontStyle': {
'values': FontStyle.values,
'normal': FontStyle.normal,
'italic': FontStyle.italic,
},
'TextAlign': {
'values': TextAlign.values,
'left': TextAlign.left,
'right': TextAlign.right,
'center': TextAlign.center,
'justify': TextAlign.justify,
'start': TextAlign.start,
'end': TextAlign.end,
},
'TextBaseline': {
'values': TextBaseline.values,
'alphabetic': TextBaseline.alphabetic,
'ideographic': TextBaseline.ideographic,
},
'TextDecorationStyle': {
'values': TextDecorationStyle.values,
'solid': TextDecorationStyle.solid,
'double': TextDecorationStyle.double,
'dotted': TextDecorationStyle.dotted,
'dashed': TextDecorationStyle.dashed,
'wavy': TextDecorationStyle.wavy,
},
'TextDirection': {
'values': TextDirection.values,
'rtl': TextDirection.rtl,
'ltr': TextDirection.ltr,
},
'TextAffinity': {
'values': TextAffinity.values,
'upstream': TextAffinity.upstream,
'downstream': TextAffinity.downstream,
},
'PlaceholderAlignment': {
'values': PlaceholderAlignment.values,
'baseline': PlaceholderAlignment.baseline,
'aboveBaseline': PlaceholderAlignment.aboveBaseline,
'belowBaseline': PlaceholderAlignment.belowBaseline,
'top': PlaceholderAlignment.top,
'bottom': PlaceholderAlignment.bottom,
'middle': PlaceholderAlignment.middle,
},
};
Loading

0 comments on commit e56169f

Please sign in to comment.