mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-05 20:48:24 +00:00
Trim long versions
This commit is contained in:
@@ -128,6 +128,10 @@ extension StringWidget on String {
|
||||
String substringMax(int size) {
|
||||
return substring(0, min(length, size));
|
||||
}
|
||||
|
||||
String removeParenthesis() {
|
||||
return replaceAll(RegExp(r'\([^()]*\)'), '');
|
||||
}
|
||||
}
|
||||
|
||||
const kI = "e593c54f840b32054dcad0fac15d57e4ac6523e31fe26b3087de6b07a2e9af58";
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:zapstore/models/app.dart';
|
||||
import 'package:zapstore/models/local_app.dart';
|
||||
import 'package:zapstore/utils/extensions.dart';
|
||||
import 'package:zapstore/widgets/install_button.dart';
|
||||
import 'package:zapstore/widgets/pill_widget.dart';
|
||||
|
||||
@@ -25,7 +26,7 @@ class VersionPillWidget extends StatelessWidget {
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
app.localApp.value!.installedVersion!,
|
||||
app.localApp.value!.installedVersion!.removeParenthesis(),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 11,
|
||||
@@ -46,7 +47,7 @@ class VersionPillWidget extends StatelessWidget {
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
app.latestMetadata!.version!,
|
||||
app.latestMetadata!.version!.removeParenthesis(),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 11,
|
||||
|
||||
Reference in New Issue
Block a user