Skip to content

Commit 91e249b

Browse files
committed
support 3.27
1 parent 33058e6 commit 91e249b

File tree

17 files changed

+61
-77
lines changed

17 files changed

+61
-77
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585

8686
## 编译运行流程
8787

88-
1、配置好Flutter开发环境(目前Flutter SDK 版本 **3.24**),可参阅 [【搭建环境】](https://flutterchina.club)
88+
1、配置好Flutter开发环境(目前Flutter SDK 版本 **3.27**),可参阅 [【搭建环境】](https://flutterchina.club)
8989

9090
2、clone代码,执行`Packages get`安装第三方包。(因为某些不可抗力原因,国内可能需要设置代理: [代理环境变量](https://flutterchina.club/setup-windows/))
9191

@@ -109,7 +109,7 @@
109109

110110
### 5、运行之前请注意下
111111

112-
>### 1、本地 Flutter SDK 版本 3.24 ; 2、是否执行过 `flutter pub get`;3、 网络等问题参考: [如果出现登陆失败或者请求失败 ](https://github.com/CarGuo/gsy_github_app_flutter/issues/643)
112+
>### 1、本地 Flutter SDK 版本 3.27 ; 2、是否执行过 `flutter pub get`;3、 网络等问题参考: [如果出现登陆失败或者请求失败 ](https://github.com/CarGuo/gsy_github_app_flutter/issues/643)
113113
114114

115115
### 下载
@@ -154,7 +154,7 @@
154154

155155
### 第三方框架
156156

157-
>当前 Flutter SDK 版本 3.24
157+
>当前 Flutter SDK 版本 3.27
158158
159159
|| 功能 |
160160
| -------------------------- | -------------- |

README_EN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ With the use and feedback of the project, will user experience and function opti
4343

4444
### Operation instructions
4545

46-
1. Configure the Flutter development environment (Tag of the current version of Flutter SDK **3.24** ).
46+
1. Configure the Flutter development environment (Tag of the current version of Flutter SDK **3.27** ).
4747

4848
2. Clone code, execute `Packages get'to install third-party packages.
4949

@@ -68,7 +68,7 @@ With the use and feedback of the project, will user experience and function opti
6868

6969
4、Be careful
7070

71-
>### Local Flutter SDK version 3.24 or more. 2. Does the third-party package version in pubspec. yaml correspond to the third-party package version in pubspec. lock?
71+
>### Local Flutter SDK version 3.27 or more. 2. Does the third-party package version in pubspec. yaml correspond to the third-party package version in pubspec. lock?
7272
7373
### Download
7474

@@ -110,7 +110,7 @@ With the use and feedback of the project, will user experience and function opti
110110

111111
### Third-party framework
112112

113-
>Current Flutter SDK version **3.24**
113+
>Current Flutter SDK version **3.27**
114114
115115
|| 功能 |
116116
| -------------------------- | -------------- |

android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
/build
99
/captures
1010
GeneratedPluginRegistrant.java
11+
.cxx/

android/app/src/main/kotlin/com/shuyu/gsygithub/gsygithubappflutter/UpdateAlbumPlugin.kt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import android.provider.MediaStore
55
import io.flutter.embedding.engine.plugins.FlutterPlugin
66
import io.flutter.plugin.common.MethodCall
77
import io.flutter.plugin.common.MethodChannel
8-
import io.flutter.plugin.common.PluginRegistry.Registrar
98

109
class UpdateAlbumPlugin : FlutterPlugin, MethodChannel.MethodCallHandler {
1110

@@ -17,18 +16,11 @@ class UpdateAlbumPlugin : FlutterPlugin, MethodChannel.MethodCallHandler {
1716
companion object {
1817

1918
private val sChannelName = "com.shuyu.gsygithub.gsygithubflutter/UpdateAlbumPlugin"
20-
21-
fun registerWith(registrar: Registrar) {
22-
val instance = UpdateAlbumPlugin()
23-
instance.channel = MethodChannel(registrar.messenger(), sChannelName)
24-
instance.context = registrar.context()
25-
instance.channel?.setMethodCallHandler(instance)
26-
}
2719
}
2820

2921
override fun onAttachedToEngine(binding: FlutterPlugin.FlutterPluginBinding) {
3022
channel = MethodChannel(
31-
binding.flutterEngine.dartExecutor, sChannelName)
23+
binding.binaryMessenger, sChannelName)
3224
context = binding.applicationContext
3325
channel!!.setMethodCallHandler(this)
3426
}

android/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
allprojects {
22
repositories {
33
google()
4-
jcenter()
54
}
65
}
76

ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
ignoresPersistentStateOnLaunch = "NO"
5151
debugDocumentVersioning = "YES"
5252
debugServiceExtension = "internal"
53+
enableGPUValidationMode = "1"
5354
allowLocationSimulation = "YES">
5455
<BuildableProductRunnable
5556
runnableDebuggingMode = "0">

lib/common/dao/issue_dao.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class IssueDao {
2323
/// @param direction 正序或者倒序
2424
static getRepositoryIssueDao(userName, repository, state,
2525
{sort, direction, page = 0, needDb = false}) async {
26-
String? fullName = userName + "/" + repository;
26+
String? fullName = "$userName/$repository";
2727
String dbState = state ?? "*";
2828
RepositoryIssueDbProvider provider = RepositoryIssueDbProvider();
2929

@@ -101,7 +101,7 @@ class IssueDao {
101101

102102
/// issue的详请
103103
static getIssueInfoDao(userName, repository, number, {needDb = true}) async {
104-
String? fullName = userName + "/" + repository;
104+
String? fullName = "$userName/$repository";
105105

106106
IssueDetailDbProvider provider = IssueDetailDbProvider();
107107

@@ -134,7 +134,7 @@ class IssueDao {
134134
/// issue的详请列表
135135
static getIssueCommentDao(userName, repository, number,
136136
{page = 0, needDb = false}) async {
137-
String? fullName = userName + "/" + repository;
137+
String? fullName = "$userName/$repository";
138138
IssueCommentDbProvider provider = IssueCommentDbProvider();
139139

140140
next() async {

lib/common/dao/repos_dao.dart

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class ReposDao {
109109
/// 仓库的详情数据
110110
static getRepositoryDetailDao(userName, reposName, branch,
111111
{needDb = true}) async {
112-
String? fullName = userName + "/" + reposName + "v3";
112+
String? fullName = userName + "/$reposName" + "v3";
113113
RepositoryDetailDbProvider provider = RepositoryDetailDbProvider();
114114

115115
next() async {
@@ -144,7 +144,7 @@ class ReposDao {
144144
/// 仓库活动事件
145145
static getRepositoryEventDao(userName, reposName,
146146
{page = 0, branch = "master", needDb = false}) async {
147-
String? fullName = userName + "/" + reposName;
147+
String? fullName = userName + "/$reposName";
148148
RepositoryEventDbProvider provider = RepositoryEventDbProvider();
149149

150150
next() async {
@@ -193,15 +193,14 @@ class ReposDao {
193193
/// 获取仓库的提交列表
194194
static getReposCommitsDao(userName, reposName,
195195
{page = 0, branch = "master", needDb = false}) async {
196-
String? fullName = userName + "/" + reposName;
196+
String? fullName = userName + "/$reposName";
197197

198198
RepositoryCommitsDbProvider provider = RepositoryCommitsDbProvider();
199199

200200
next() async {
201201
String url = Address.getReposCommits(userName, reposName) +
202202
Address.getPageParams("?", page) +
203-
"&sha=" +
204-
branch;
203+
"&sha=$branch";
205204
var res = await httpManager.netFetch(url, null, null, null);
206205
if (res != null && res.result) {
207206
List<RepoCommit> list = [];
@@ -295,7 +294,7 @@ class ReposDao {
295294
/// 获取当前仓库所有订阅用户
296295
static getRepositoryWatcherDao(userName, reposName, page,
297296
{needDb = false}) async {
298-
String? fullName = userName + "/" + reposName;
297+
String? fullName = "$userName/$reposName";
299298
RepositoryWatcherDbProvider provider = RepositoryWatcherDbProvider();
300299

301300
next() async {
@@ -334,7 +333,7 @@ class ReposDao {
334333
/// 获取当前仓库所有star用户
335334
static getRepositoryStarDao(userName, reposName, page,
336335
{needDb = false}) async {
337-
String? fullName = userName + "/" + reposName;
336+
String? fullName = "$userName/$reposName";
338337
RepositoryStarDbProvider provider = RepositoryStarDbProvider();
339338
next() async {
340339
String url = Address.getReposStar(userName, reposName) +
@@ -372,7 +371,7 @@ class ReposDao {
372371
/// 获取仓库的fork分支
373372
static getRepositoryForksDao(userName, reposName, page,
374373
{needDb = false}) async {
375-
String? fullName = userName + "/" + reposName;
374+
String? fullName = "$userName/$reposName";
376375
RepositoryForkDbProvider provider = RepositoryForkDbProvider();
377376
next() async {
378377
String url = Address.getReposForks(userName, reposName) +
@@ -545,12 +544,12 @@ class ReposDao {
545544
/// 详情的remde数据
546545
static getRepositoryDetailReadmeDao(userName, reposName, branch,
547546
{needDb = true}) async {
548-
String? fullName = userName + "/" + reposName;
547+
String? fullName = "$userName/$reposName";
549548
RepositoryDetailReadmeDbProvider provider =
550549
RepositoryDetailReadmeDbProvider();
551550

552551
next() async {
553-
String url = Address.readmeFile(userName + '/' + reposName, branch);
552+
String url = Address.readmeFile('$userName/$reposName', branch);
554553
var res = await httpManager.netFetch(
555554
url,
556555
null,

lib/common/dao/user_dao.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class UserDao {
5959
}
6060

6161
static login(userName, password, store) async {
62-
String type = userName + ":" + password;
62+
String type = "$userName:$password";
6363
var bytes = utf8.encode(type);
6464
var base64Str = base64.encode(bytes);
6565
if (Config.DEBUG!) {

lib/common/utils/html_utils.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,11 @@ class HtmlUtils {
109109
"<meta name=\“app-mobile-web-app-capable\” content=\“yes\" /> " +
110110
"<link href=\"https:\/\/cdn.bootcss.com/highlight.js/9.12.0/styles/dracula.min.css\" rel=\"stylesheet\">\n" +
111111
"<script src=\"https:\/\/cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js\"></script> " +
112-
"<script>hljs.configure({'useBR': " +
113-
userBR.toString() +
112+
"<script>hljs.configure({'useBR': ${userBR.toString()}"
114113
"});hljs.initHighlightingOnLoad();</script> " +
115114
"<style>" +
116-
"body{background: " +
117-
backgroundColor};}a {color:$actionColor !important;}.highlight pre, pre { word-wrap: ${wrap ? "break-word" : "normal"}; white-space: ${wrap ? "pre-wrap" : "pre"}; }thead, tr {background:${GSYColors.miWhiteString};}td, th {padding: 5px 10px;font-size: 12px;direction:hor}.highlight {overflow: scroll; background: ${GSYColors.miWhiteString}}tr:nth-child(even) {background:${GSYColors.primaryLightValueString};color:${GSYColors.miWhiteString};}tr:nth-child(odd) {background: ${GSYColors.miWhiteString};color:${GSYColors.primaryLightValueString};}th {font-size: 14px;color:${GSYColors.miWhiteString};background:${GSYColors.primaryLightValueString};}</style></head>\n<body>\n" +
115+
"body{background: $backgroundColor"
116+
};}a {color:$actionColor !important;}.highlight pre, pre { word-wrap: ${wrap ? "break-word" : "normal"}; white-space: ${wrap ? "pre-wrap" : "pre"}; }thead, tr {background:${GSYColors.miWhiteString};}td, th {padding: 5px 10px;font-size: 12px;direction:hor}.highlight {overflow: scroll; background: ${GSYColors.miWhiteString}}tr:nth-child(even) {background:${GSYColors.primaryLightValueString};color:${GSYColors.miWhiteString};}tr:nth-child(odd) {background: ${GSYColors.miWhiteString};color:${GSYColors.primaryLightValueString};}th {font-size: 14px;color:${GSYColors.miWhiteString};background:${GSYColors.primaryLightValueString};}</style></head>\n<body>\n" +
118117
mdHTML}</body>\n</html>";
119118
}
120119

lib/page/debug/debug_label.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class _GlobalLabelState extends State<GlobalLabel> {
9696
color: Colors.transparent,
9797
child: Container(
9898
decoration: BoxDecoration(
99-
color: Colors.black.withOpacity(0.6),
99+
color: Colors.black.withValues(alpha: 0.6),
100100
borderRadius: const BorderRadius.all(
101101
Radius.circular(5),
102102
),

lib/page/notify_page.dart

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class _NotifyPageState extends State<NotifyPage>
2828
AutomaticKeepAliveClientMixin<NotifyPage>,
2929
GSYListState<NotifyPage>,
3030
SingleTickerProviderStateMixin {
31-
late SlidableController slidableController;
3231

3332
int selectIndex = 0;
3433

@@ -42,8 +41,8 @@ class _NotifyPageState extends State<NotifyPage>
4241
///只有未读消息支持 Slidable 滑动效果
4342
return Slidable(
4443
key: ValueKey<String>("${index}_$selectIndex"),
45-
controller: slidableController,
4644
endActionPane: ActionPane(
45+
dragDismissible: false,
4746
motion: const ScrollMotion(),
4847
dismissible: DismissiblePane(onDismissed: () {
4948
UserDao.setNotificationAsReadDao(notification.id.toString())
@@ -121,12 +120,6 @@ class _NotifyPageState extends State<NotifyPage>
121120
return await _getDataLogic();
122121
}
123122

124-
@override
125-
void initState() {
126-
super.initState();
127-
slidableController = SlidableController(this);
128-
}
129-
130123
@override
131124
Widget build(BuildContext context) {
132125
super.build(context); // See AutomaticKeepAliveClientMixin.

lib/widget/diff_scale_text.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class _DiffText extends CustomPainter {
137137
textPaint.color = textStyle!.color!;
138138
} else {
139139
textPaint.color = textStyle!.color!
140-
.withAlpha((textStyle!.color!.alpha * alphaFactor).floor());
140+
.withAlpha((textStyle!.color!.a * alphaFactor).floor());
141141
}
142142
var textPainter = TextPainter(
143143
text: TextSpan(

lib/widget/gsy_tabs.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class _TabStyle extends AnimatedWidget {
138138
@override
139139
Widget build(BuildContext context) {
140140
final ThemeData themeData = Theme.of(context);
141-
final TabBarTheme tabBarTheme = TabBarTheme.of(context);
141+
final TabBarThemeData tabBarTheme = TabBarTheme.of(context);
142142
final Animation<double> animation = listenable as Animation<double>;
143143

144144
// To enable TextStyle.lerp(style1, style2, value), both styles must have
@@ -736,7 +736,7 @@ class _TabBarState extends State<TabBar> {
736736

737737
Decoration? get _indicator {
738738
if (widget.indicator != null) return widget.indicator;
739-
final TabBarTheme tabBarTheme = TabBarTheme.of(context);
739+
final TabBarThemeData tabBarTheme = TabBarTheme.of(context);
740740
if (tabBarTheme.indicator != null) return tabBarTheme.indicator;
741741

742742
Color color = widget.indicatorColor ?? Theme.of(context).indicatorColor;
@@ -750,7 +750,7 @@ class _TabBarState extends State<TabBar> {
750750
//
751751
// The material's color might be null (if it's a transparency). In that case
752752
// there's no good way for us to find out what the color is so we don't.
753-
if (color.value == Material.of(context).color?.value) color = Colors.white;
753+
if (color == Material.of(context).color) color = Colors.white;
754754

755755
return UnderlineTabIndicator(
756756
insets: widget.indicatorPadding,
@@ -978,7 +978,7 @@ class _TabBarState extends State<TabBar> {
978978
);
979979
}
980980

981-
final TabBarTheme tabBarTheme = TabBarTheme.of(context);
981+
final TabBarThemeData tabBarTheme = TabBarTheme.of(context);
982982

983983

984984

lib/widget/pull/nested/nested_refresh.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ class NestedScrollViewRefreshIndicatorState
246246
final ThemeData theme = Theme.of(context);
247247
_valueColor = _positionController.drive(
248248
ColorTween(
249-
begin: (widget.color ?? theme.colorScheme.primary).withOpacity(0.0),
250-
end: (widget.color ?? theme.colorScheme.primary).withOpacity(1.0),
249+
begin: (widget.color ?? theme.colorScheme.primary).withValues(alpha: 0.0),
250+
end: (widget.color ?? theme.colorScheme.primary).withValues(alpha: 1.0),
251251
).chain(CurveTween(
252252
curve: const Interval(0.0, 1.0 / _kDragSizeFactorLimit),
253253
)),
@@ -262,8 +262,8 @@ class NestedScrollViewRefreshIndicatorState
262262
final ThemeData theme = Theme.of(context);
263263
_valueColor = _positionController.drive(
264264
ColorTween(
265-
begin: (widget.color ?? theme.colorScheme.primary).withOpacity(0.0),
266-
end: (widget.color ?? theme.colorScheme.primary).withOpacity(1.0),
265+
begin: (widget.color ?? theme.colorScheme.primary).withValues(alpha: 0.0),
266+
end: (widget.color ?? theme.colorScheme.primary).withValues(alpha: 1.0),
267267
).chain(CurveTween(
268268
curve: const Interval(0.0, 1.0 / _kDragSizeFactorLimit),
269269
)),
@@ -399,7 +399,7 @@ class NestedScrollViewRefreshIndicatorState
399399
}
400400
_positionController.value =
401401
newValue.clamp(0.0, 1.0); // this triggers various rebuilds
402-
if (_mode == _RefreshIndicatorMode.drag && _valueColor.value!.alpha == 0xFF) {
402+
if (_mode == _RefreshIndicatorMode.drag && _valueColor.value!.a == 0xFF) {
403403
_mode = _RefreshIndicatorMode.armed;
404404
}
405405
}

0 commit comments

Comments
 (0)