add package version
This commit is contained in:
@@ -2,9 +2,11 @@ import 'package:example/advanced_options_page.dart';
|
||||
import 'package:example/main.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:yaml/yaml.dart';
|
||||
|
||||
import 'notifications_service.dart';
|
||||
|
||||
@@ -214,6 +216,32 @@ class ChooseUserPage extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: FutureBuilder<String>(
|
||||
future: rootBundle.loadString('pubspec.lock'),
|
||||
builder: (context, snapshot) {
|
||||
if (!snapshot.hasData) {
|
||||
return SizedBox();
|
||||
}
|
||||
|
||||
final pubspec = snapshot.data;
|
||||
final yaml = loadYaml(pubspec);
|
||||
final streamChatDep =
|
||||
yaml['packages']['stream_chat_flutter']['version'];
|
||||
|
||||
print('streamChatDep: ${streamChatDep}');
|
||||
return Text(
|
||||
'Stream SDK v ${streamChatDep}',
|
||||
style: TextStyle(
|
||||
fontSize: 14.5,
|
||||
color: Colors.black.withOpacity(.13),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: example
|
||||
description: A new Flutter project.
|
||||
version: 1.0.49+51
|
||||
version: 1.0.50+52
|
||||
|
||||
environment:
|
||||
sdk: ">=2.2.2 <3.0.0"
|
||||
@@ -14,6 +14,7 @@ dependencies:
|
||||
flutter_local_notifications: ^2.0.0
|
||||
flutter_svg: ^0.19.1
|
||||
flutter_secure_storage: ^3.3.5
|
||||
yaml: ^2.2.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
@@ -26,6 +27,7 @@ dev_dependencies:
|
||||
flutter:
|
||||
assets:
|
||||
- assets/
|
||||
- pubspec.lock
|
||||
uses-material-design: true
|
||||
|
||||
flutter_icons:
|
||||
|
||||
Reference in New Issue
Block a user