mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-07-01 06:03:29 +00:00
Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
61e279f719 | |||
94ae3434e4 | |||
78ae2a574a | |||
75b06e7df8 | |||
71a72d4f04 | |||
90b3ffbe81 | |||
bfe932c053 | |||
4fd8c4d613 | |||
ecc4f5bffe | |||
c849ee0bac | |||
04114dede1 | |||
fff33f907a | |||
9a82301c52 | |||
48ececf93c | |||
bc6068c2a1 | |||
5b680bb922 | |||
2b05fbda35 | |||
30494ff74a | |||
062abc5a03 | |||
21506f769e | |||
e180f0bc13 | |||
7ae50e21a4 | |||
ae75429b1d | |||
f2380ba60a |
2
.gitignore
vendored
2
.gitignore
vendored
@ -74,3 +74,5 @@ lib/*private*.dart
|
||||
|
||||
.flutter-plugins-dependencies
|
||||
|
||||
local.properties
|
||||
.gradle
|
||||
|
@ -33,7 +33,7 @@ if (keystorePropertiesFile.exists()) {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
compileSdkVersion 31
|
||||
|
||||
compileOptions {
|
||||
|
||||
@ -45,12 +45,15 @@ android {
|
||||
|
||||
lintOptions {
|
||||
disable 'InvalidPackage'
|
||||
|
||||
// TODO remove this fix to use Gradle plugin 4 ASAP
|
||||
checkReleaseBuilds false
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.communiquons.comunic"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
targetSdkVersion 31
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@ -110,9 +113,9 @@ flutter {
|
||||
|
||||
dependencies {
|
||||
implementation 'com.neovisionaries:nv-websocket-client:2.14'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
testImplementation 'junit:junit:4.13.1'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
@ -59,7 +59,8 @@
|
||||
android:hardwareAccelerated="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:exported="true">
|
||||
<!-- This keeps the window background of the activity showing
|
||||
until Flutter renders its first frame. It can be removed if
|
||||
there is no splash screen (such as the default splash screen
|
||||
@ -69,12 +70,6 @@
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme" />
|
||||
|
||||
<!-- Specify that the launch screen should continue being displayed -->
|
||||
<!-- until Flutter renders its first frame. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/launch_background" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
@ -100,7 +100,10 @@ public class NotificationsService extends Service implements Runnable {
|
||||
|
||||
Intent notificationIntent = new Intent(this, MainActivity.class);
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(this,
|
||||
0, notificationIntent, 0);
|
||||
0,
|
||||
notificationIntent,
|
||||
android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M ? PendingIntent.FLAG_IMMUTABLE : 0);
|
||||
|
||||
Notification notification = new NotificationCompat.Builder(this, SVC_CHANNEL_ID)
|
||||
.setContentTitle("Comunic")
|
||||
.setContentText(getText(R.string.independent_push_notification_notification_text))
|
||||
@ -197,12 +200,12 @@ public class NotificationsService extends Service implements Runnable {
|
||||
ws.setPingInterval(PING_INTERVAL);
|
||||
ws.addListener(new WebSocketAdapter() {
|
||||
@Override
|
||||
public void onConnected(WebSocket websocket, Map<String, List<String>> headers) throws Exception {
|
||||
public void onConnected(WebSocket websocket, Map<String, List<String>> headers) {
|
||||
Log.v(TAG, "Connected to independent push notifications service!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisconnected(WebSocket websocket, WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame, boolean closedByServer) throws Exception {
|
||||
public void onDisconnected(WebSocket websocket, WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame, boolean closedByServer) {
|
||||
Log.v(TAG, "Disconnected from independent push notifications websocket!");
|
||||
synchronized (lock) {
|
||||
lock.notify();
|
||||
@ -210,12 +213,12 @@ public class NotificationsService extends Service implements Runnable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextFrame(WebSocket websocket, WebSocketFrame frame) throws Exception {
|
||||
public void onTextFrame(WebSocket websocket, WebSocketFrame frame) {
|
||||
handleTextFrame(frame);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(WebSocket websocket, WebSocketException cause) throws Exception {
|
||||
public void onError(WebSocket websocket, WebSocketException cause) {
|
||||
Log.e(TAG, "An error occured, closing WebSocket!");
|
||||
cause.printStackTrace();
|
||||
websocket.disconnect();
|
||||
@ -254,17 +257,14 @@ public class NotificationsService extends Service implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
private void dropNotification(String id) throws Exception {
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
NotificationManagerCompat notifManager = NotificationManagerCompat.from(NotificationsService.this);
|
||||
notifManager.cancel(id, NOTIFS_ID);
|
||||
}
|
||||
private void dropNotification(String id) {
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
NotificationManagerCompat notifManager = NotificationManagerCompat.from(NotificationsService.this);
|
||||
notifManager.cancel(id, NOTIFS_ID);
|
||||
});
|
||||
}
|
||||
|
||||
private void sendNotification(PushNotification n) throws Exception {
|
||||
private void sendNotification(PushNotification n) {
|
||||
new Handler(Looper.getMainLooper()).post(() -> postNotification(n));
|
||||
}
|
||||
|
||||
@ -273,7 +273,12 @@ public class NotificationsService extends Service implements Runnable {
|
||||
createPushNotificationChannel();
|
||||
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(
|
||||
this,
|
||||
0,
|
||||
intent,
|
||||
android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M ? PendingIntent.FLAG_IMMUTABLE : 0
|
||||
);
|
||||
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, NOTIFS_CHANNEL_ID)
|
||||
.setSmallIcon(R.drawable.ic_notifications)
|
||||
|
@ -1,21 +1,21 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.4'
|
||||
classpath 'com.android.tools.build:gradle:4.1.3'
|
||||
|
||||
// Firebase
|
||||
classpath 'com.google.gms:google-services:4.3.5'
|
||||
classpath 'com.google.gms:google-services:4.3.10'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
||||
|
@ -5,7 +5,7 @@ make stable_release_split_per_abi && \
|
||||
mv build/app/outputs/flutter-apk/app-armeabi-v7a-stable-release.apk "$DEST" && \
|
||||
mv build/app/outputs/flutter-apk/app-arm64-v8a-stable-release.apk "$DEST" && \
|
||||
mv build/app/outputs/flutter-apk/app-x86_64-stable-release.apk "$DEST" && \
|
||||
mv build/app/outputs/mapping/stable/release/mapping.txt "$DEST" && \
|
||||
mv build/app/outputs/mapping/stableRelease/mapping.txt "$DEST" && \
|
||||
make stable_release && \
|
||||
mv build/app/outputs/flutter-apk/app-stable-release.apk "$DEST"
|
||||
|
||||
|
@ -5,4 +5,4 @@ make forez_release_split_per_abi && \
|
||||
mv build/app/outputs/flutter-apk/app-armeabi-v7a-forez-release.apk "$DEST" && \
|
||||
mv build/app/outputs/flutter-apk/app-arm64-v8a-forez-release.apk "$DEST" && \
|
||||
mv build/app/outputs/flutter-apk/app-x86_64-forez-release.apk "$DEST" && \
|
||||
mv build/app/outputs/mapping/forez/release/mapping.txt "$DEST"
|
||||
mv build/app/outputs/mapping/forezRelease/mapping.txt "$DEST"
|
@ -9,6 +9,7 @@ import 'package:comunic/ui/routes/main_route/page_info.dart';
|
||||
import 'package:comunic/ui/screens/conversations_list_screen.dart';
|
||||
import 'package:comunic/ui/screens/group_sections/forez_presence_section.dart';
|
||||
import 'package:comunic/ui/screens/group_sections/group_posts_section.dart';
|
||||
import 'package:comunic/ui/widgets/banner_widget.dart';
|
||||
import 'package:comunic/ui/widgets/safe_state.dart';
|
||||
import 'package:comunic/ui/widgets/status_widget.dart';
|
||||
import 'package:comunic/ui/widgets/tab_transition_widget.dart';
|
||||
@ -115,7 +116,12 @@ class _ForezRouteBodyState extends SafeState<ForezRouteBody> {
|
||||
actions: <Widget>[_buildPopupMenuButton()],
|
||||
bottom: TabBar(tabs: _tabs),
|
||||
),
|
||||
body: TabBarView(children: _tabsPages),
|
||||
body: Column(
|
||||
children: [
|
||||
BannerWidget(),
|
||||
Expanded(child: TabBarView(children: _tabsPages)),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -2,10 +2,11 @@
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
// ignore_for_file: directives_ordering
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:connectivity_for_web/connectivity_for_web.dart';
|
||||
import 'package:file_picker/src/file_picker_web.dart';
|
||||
import 'package:file_picker/_internal/file_picker_web.dart';
|
||||
import 'package:firebase_core_web/firebase_core_web.dart';
|
||||
import 'package:firebase_messaging_web/firebase_messaging_web.dart';
|
||||
import 'package:image_picker_for_web/image_picker_for_web.dart';
|
||||
|
@ -17,6 +17,7 @@ class ServerConfigurationHelper {
|
||||
(await APIRequest.withoutLogin("server/config").execWithThrow())
|
||||
.getObject();
|
||||
|
||||
final banner = response["banner"];
|
||||
final pushNotificationsPolicy = response["push_notifications"];
|
||||
final passwordPolicy = response["password_policy"];
|
||||
final dataConservationPolicy = response["data_conservation_policy"];
|
||||
@ -31,6 +32,15 @@ class ServerConfigurationHelper {
|
||||
contactEmail: response["contact_email"],
|
||||
playStoreURL: response["play_store_url"],
|
||||
androidDirectDownloadURL: response["android_direct_download_url"],
|
||||
banner: banner == null
|
||||
? null
|
||||
: Banner(
|
||||
enabled: banner["enabled"],
|
||||
expire: banner["expire"],
|
||||
nature: BannerNatureExt.fromStr(banner["nature"]),
|
||||
message: Map<String, dynamic>.from(banner["message"])
|
||||
.map((key, value) => MapEntry(key, value.toString())),
|
||||
link: banner["link"]),
|
||||
notificationsPolicy: NotificationsPolicy(
|
||||
hasFirebase: pushNotificationsPolicy["has_firebase"],
|
||||
hasIndependent: pushNotificationsPolicy["has_independent"],
|
||||
@ -98,3 +108,5 @@ class ServerConfigurationHelper {
|
||||
|
||||
/// Shortcut for server configuration
|
||||
ServerConfig get srvConfig => ServerConfigurationHelper.config;
|
||||
|
||||
bool get showBanner => srvConfig.banner != null && srvConfig.banner.visible;
|
@ -9,6 +9,7 @@ import 'package:comunic/utils/flutter_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:connectivity/connectivity.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
/// Main file of the application
|
||||
///
|
||||
@ -68,7 +69,8 @@ class ComunicApplicationState extends State<ComunicApplication> {
|
||||
primaryColor: config().primaryColor,
|
||||
primaryColorDark: config().primaryColorDark,
|
||||
appBarTheme: AppBarTheme(
|
||||
brightness: Brightness.dark,
|
||||
backgroundColor: config().primaryColor,
|
||||
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||
)),
|
||||
showPerformanceOverlay: prefs.showPerformancesOverlay,
|
||||
);
|
||||
|
@ -1,8 +1,5 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:comunic/ui/routes/tour_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
/// Application configuration model
|
||||
///
|
||||
|
@ -2,7 +2,6 @@ import 'package:comunic/helpers/serialization/base_serialization_helper.dart';
|
||||
import 'package:comunic/models/conversation_member.dart';
|
||||
import 'package:comunic/utils/account_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
import 'group.dart';
|
||||
|
||||
|
@ -4,7 +4,6 @@ import 'package:comunic/models/displayed_content.dart';
|
||||
import 'package:comunic/utils/account_utils.dart' as account;
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
/// Single conversation message
|
||||
///
|
||||
@ -132,10 +131,14 @@ class ConversationServerMessage {
|
||||
return Set()..add(userID);
|
||||
|
||||
case ConversationServerMessageType.USER_ADDED_ANOTHER_USER:
|
||||
return Set()..add(userWhoAdded)..add(userAdded);
|
||||
return Set()
|
||||
..add(userWhoAdded)
|
||||
..add(userAdded);
|
||||
|
||||
case ConversationServerMessageType.USER_REMOVED_ANOTHER_USER:
|
||||
return Set()..add(userWhoRemoved)..add(userRemoved);
|
||||
return Set()
|
||||
..add(userWhoRemoved)
|
||||
..add(userRemoved);
|
||||
}
|
||||
|
||||
throw Exception("Unsupported server message type!");
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'package:comunic/utils/date_utils.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:version/version.dart';
|
||||
|
||||
@ -132,6 +133,42 @@ class AccountInformationPolicy {
|
||||
assert(maxLocationLength != null);
|
||||
}
|
||||
|
||||
enum BannerNature { Information, Warning, Success }
|
||||
|
||||
extension BannerNatureExt on BannerNature {
|
||||
static BannerNature fromStr(String s) {
|
||||
switch (s) {
|
||||
case "information":
|
||||
return BannerNature.Information;
|
||||
case "success":
|
||||
return BannerNature.Success;
|
||||
case "warning":
|
||||
default:
|
||||
return BannerNature.Warning;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Banner {
|
||||
final bool enabled;
|
||||
final int expire;
|
||||
final BannerNature nature;
|
||||
final Map<String, String> message;
|
||||
final String link;
|
||||
|
||||
const Banner({
|
||||
@required this.enabled,
|
||||
@required this.expire,
|
||||
@required this.nature,
|
||||
@required this.message,
|
||||
@required this.link,
|
||||
}) : assert(enabled != null),
|
||||
assert(nature != null),
|
||||
assert(message != null);
|
||||
|
||||
bool get visible => enabled && (expire == null || expire > time());
|
||||
}
|
||||
|
||||
class ServerConfig {
|
||||
final Version minSupportedMobileVersion;
|
||||
final String termsURL;
|
||||
@ -139,6 +176,7 @@ class ServerConfig {
|
||||
final String contactEmail;
|
||||
final String playStoreURL;
|
||||
final String androidDirectDownloadURL;
|
||||
final Banner banner;
|
||||
final NotificationsPolicy notificationsPolicy;
|
||||
final PasswordPolicy passwordPolicy;
|
||||
final ServerDataConservationPolicy dataConservationPolicy;
|
||||
@ -152,6 +190,7 @@ class ServerConfig {
|
||||
@required this.contactEmail,
|
||||
@required this.playStoreURL,
|
||||
@required this.androidDirectDownloadURL,
|
||||
@required this.banner,
|
||||
@required this.notificationsPolicy,
|
||||
@required this.passwordPolicy,
|
||||
@required this.dataConservationPolicy,
|
||||
|
@ -1,7 +1,6 @@
|
||||
import 'package:chewie_audio/chewie_audio.dart';
|
||||
import 'package:comunic/ui/widgets/async_screen_widget.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import 'package:comunic/ui/dialogs/single_input_dialog.dart';
|
||||
import 'package:comunic/utils/input_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Ask the user to enter an URL
|
||||
|
@ -1,6 +1,5 @@
|
||||
import 'package:comunic/ui/dialogs/single_input_dialog.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Add YouTube link dialog
|
||||
|
@ -1,6 +1,5 @@
|
||||
import 'package:comunic/ui/widgets/dialogs/auto_sized_dialog_content_widget.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Build and show a dialog to offer to the user to choose between several
|
||||
|
@ -8,7 +8,6 @@ import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:filesize/filesize.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:image_cropper/image_cropper.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:mime/mime.dart';
|
||||
@ -124,7 +123,7 @@ Future<BytesFile> showPickFileDialog({
|
||||
// Pick an image
|
||||
case _FileChoices.PICK_IMAGE:
|
||||
case _FileChoices.TAKE_PICTURE:
|
||||
final image = await ImagePicker().getImage(
|
||||
final image = await ImagePicker().pickImage(
|
||||
source: choice == _FileChoices.PICK_IMAGE
|
||||
? ImageSource.gallery
|
||||
: ImageSource.camera,
|
||||
@ -143,7 +142,7 @@ Future<BytesFile> showPickFileDialog({
|
||||
// Pick an video
|
||||
case _FileChoices.PICK_VIDEO:
|
||||
case _FileChoices.TAKE_VIDEO:
|
||||
final image = await ImagePicker().getVideo(
|
||||
final image = await ImagePicker().pickVideo(
|
||||
source: choice == _FileChoices.PICK_VIDEO
|
||||
? ImageSource.gallery
|
||||
: ImageSource.camera,
|
||||
|
@ -4,7 +4,6 @@ import 'package:comunic/ui/widgets/dialogs/confirm_dialog_button.dart';
|
||||
import 'package:comunic/ui/widgets/pick_user_widget.dart';
|
||||
import 'package:comunic/ui/widgets/safe_state.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Pick user dialog
|
||||
|
@ -2,7 +2,6 @@ import 'package:comunic/enums/post_visibility_level.dart';
|
||||
import 'package:comunic/ui/tiles/post_visibility_level_tile.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
/// Post utilities
|
||||
///
|
||||
|
@ -1,7 +1,6 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Screen dialog
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Dialog to use to ask the user to enter a value
|
||||
|
@ -2,7 +2,6 @@ import 'package:comunic/helpers/groups_helper.dart';
|
||||
import 'package:comunic/helpers/settings_helper.dart';
|
||||
import 'package:comunic/ui/widgets/safe_state.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Show a dialog to offer the user to pick a virtual directory
|
||||
|
@ -6,9 +6,7 @@ import 'package:comunic/ui/widgets/safe_state.dart';
|
||||
import 'package:comunic/utils/input_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
|
||||
/// Reset password route
|
||||
///
|
||||
|
@ -1,6 +1,7 @@
|
||||
import 'package:comunic/ui/routes/main_route/main_route.dart';
|
||||
import 'package:comunic/ui/routes/main_route/page_info.dart';
|
||||
import 'package:comunic/ui/screens/notifications_screen.dart';
|
||||
import 'package:comunic/ui/widgets/banner_widget.dart';
|
||||
import 'package:comunic/ui/widgets/mobile_mode/mobile_appbar_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@ -33,7 +34,14 @@ class _MainRouteState extends MainController {
|
||||
appBar: currentPage.hideNavBar
|
||||
? null
|
||||
: ComunicMobileAppBar(currentPage: currentPage),
|
||||
body: SafeArea(key: currentPage.key, child: currentPage.child),
|
||||
body: SafeArea(
|
||||
key: currentPage.key,
|
||||
child: Column(
|
||||
children: [
|
||||
BannerWidget(),
|
||||
Expanded(child: currentPage.child)
|
||||
],
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -3,6 +3,7 @@ import 'package:comunic/ui/dialogs/screen_dialog.dart';
|
||||
import 'package:comunic/ui/routes/main_route/main_route.dart';
|
||||
import 'package:comunic/ui/routes/main_route/page_info.dart';
|
||||
import 'package:comunic/ui/screens/newest_posts.dart';
|
||||
import 'package:comunic/ui/widgets/banner_widget.dart';
|
||||
import 'package:comunic/ui/widgets/tablet_mode/calls/calls_area.dart';
|
||||
import 'package:comunic/ui/widgets/tablet_mode/conversations/conversations_area_widget.dart';
|
||||
import 'package:comunic/ui/widgets/tablet_mode/current_user_panel.dart';
|
||||
@ -79,7 +80,12 @@ class _TabletRouteState extends MainController {
|
||||
Widget _buildRightPane() => Container(
|
||||
key: currentPage.key,
|
||||
width: MediaQuery.of(context).size.width - _SideBarSize,
|
||||
child: currentPage.child,
|
||||
child: Column(
|
||||
children: [
|
||||
BannerWidget(),
|
||||
Expanded(child: currentPage.child),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@override
|
||||
|
@ -4,7 +4,7 @@ import 'package:comunic/utils/flutter_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
/// About application settings
|
||||
|
@ -8,13 +8,12 @@ import 'package:comunic/ui/widgets/settings/header_spacer_section.dart';
|
||||
import 'package:comunic/ui/widgets/settings/multi_choices_settings_tile.dart';
|
||||
import 'package:comunic/utils/account_utils.dart';
|
||||
import 'package:comunic/utils/files_utils.dart';
|
||||
import 'package:comunic/utils/identicon_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:identicon/identicon.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
import 'package:image_cropper/image_cropper.dart';
|
||||
import 'package:random_string/random_string.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
|
||||
import '../../../utils/log_utils.dart';
|
||||
import '../../../utils/ui_utils.dart';
|
||||
@ -167,7 +166,7 @@ class _AccountImageSettingsScreenState
|
||||
/// Generate a random account image
|
||||
void _generateRandomAccountImage() async {
|
||||
// Generate emoticon
|
||||
final bytes = Identicon().generate(randomString(10));
|
||||
final bytes = await genIdenticon(context);
|
||||
|
||||
if (!await SettingsHelper.uploadAccountImageFromMemory(bytes)) {
|
||||
showSimpleSnack(
|
||||
|
@ -12,8 +12,7 @@ import 'package:comunic/utils/flutter_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
|
||||
/// Account privacy settings
|
||||
///
|
||||
@ -176,7 +175,7 @@ class DataConservationPolicyTile extends SettingsTile {
|
||||
final Function(int) onChange;
|
||||
final int minValue;
|
||||
|
||||
const DataConservationPolicyTile({
|
||||
DataConservationPolicyTile({
|
||||
@required this.value,
|
||||
@required this.title,
|
||||
@required this.onChange,
|
||||
|
@ -12,7 +12,7 @@ import 'package:comunic/utils/flutter_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
|
||||
/// Account security settings
|
||||
///
|
||||
|
@ -12,7 +12,7 @@ import 'package:comunic/utils/flutter_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
|
||||
enum _MainMenuActions { SHOW_TOUR }
|
||||
|
||||
|
@ -5,7 +5,7 @@ import 'package:comunic/utils/flutter_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
|
||||
/// Application settings
|
||||
///
|
||||
@ -94,7 +94,7 @@ class _PreferencesSettingsTile extends SettingsTile {
|
||||
final Function onChange;
|
||||
final PreferencesHelper helper;
|
||||
|
||||
const _PreferencesSettingsTile({
|
||||
_PreferencesSettingsTile({
|
||||
@required this.preferencesKey,
|
||||
@required this.title,
|
||||
@required this.subtitle,
|
||||
|
@ -14,7 +14,7 @@ import 'package:comunic/utils/input_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
|
||||
/// General account settings
|
||||
///
|
||||
|
@ -8,7 +8,7 @@ import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/log_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
|
||||
/// Notifications settings
|
||||
///
|
||||
|
@ -2,7 +2,6 @@ import 'package:comunic/helpers/posts_helper.dart';
|
||||
import 'package:comunic/lists/posts_list.dart';
|
||||
import 'package:comunic/ui/widgets/posts_list_widget.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Single post route
|
||||
|
@ -19,14 +19,13 @@ import 'package:comunic/ui/widgets/settings/header_spacer_section.dart';
|
||||
import 'package:comunic/ui/widgets/settings/multi_choices_settings_tile.dart';
|
||||
import 'package:comunic/ui/widgets/settings/text_settings_edit_tile.dart';
|
||||
import 'package:comunic/utils/files_utils.dart';
|
||||
import 'package:comunic/utils/identicon_utils.dart';
|
||||
import 'package:comunic/utils/input_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/log_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:identicon/identicon.dart';
|
||||
import 'package:random_string/random_string.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
|
||||
/// Groups settings screen
|
||||
///
|
||||
@ -313,12 +312,12 @@ class _GroupSettingsScreenState extends SafeState<GroupSettingsScreen> {
|
||||
)
|
||||
.toList()
|
||||
.cast<SettingsTile>()
|
||||
..add(
|
||||
SettingsTile(
|
||||
title: tr("Create a new conversation"),
|
||||
onPressed: _createNewGroupConversation,
|
||||
),
|
||||
),
|
||||
..add(
|
||||
SettingsTile(
|
||||
title: tr("Create a new conversation"),
|
||||
onPressed: _createNewGroupConversation,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
void _createNewGroupConversation(BuildContext context) async {
|
||||
@ -432,8 +431,7 @@ class _GroupSettingsScreenState extends SafeState<GroupSettingsScreen> {
|
||||
/// Generate a new random logo for the group
|
||||
void _generateRandomLogo() async {
|
||||
try {
|
||||
final newLogo =
|
||||
Identicon(rows: 10, cols: 10).generate(randomString(20), size: 100);
|
||||
final newLogo = await genIdenticon(context);
|
||||
await _doUploadLogo(newLogo);
|
||||
} catch (e, stack) {
|
||||
print("Could not generate new logo! $e\n$stack");
|
||||
|
@ -15,7 +15,6 @@ import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/navigation_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
|
||||
/// Notifications screen
|
||||
///
|
||||
|
@ -29,6 +29,7 @@ class _UserPostsSectionState extends State<UserPostsSection> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => PostsListWidget(
|
||||
key: _postsKey,
|
||||
topWidgets: [
|
||||
widget.user.canPostTexts
|
||||
? PostCreateFormWidget(
|
||||
|
@ -25,7 +25,6 @@ import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/navigation_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../models/api_request.dart';
|
||||
|
113
lib/ui/widgets/banner_widget.dart
Normal file
113
lib/ui/widgets/banner_widget.dart
Normal file
@ -0,0 +1,113 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:comunic/helpers/server_config_helper.dart';
|
||||
import 'package:comunic/models/server_config.dart';
|
||||
import 'package:comunic/utils/date_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
bool _bannerDismissed = false;
|
||||
|
||||
class BannerWidget extends StatefulWidget {
|
||||
const BannerWidget({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_BannerWidgetState createState() => _BannerWidgetState();
|
||||
}
|
||||
|
||||
class _BannerWidgetState extends State<BannerWidget> {
|
||||
Timer _timer;
|
||||
|
||||
bool get _shouldShowBanner => showBanner && !_bannerDismissed;
|
||||
|
||||
void _hideBanner() {
|
||||
if (this.mounted) setState(() => _bannerDismissed = true);
|
||||
}
|
||||
|
||||
void _openLink() {
|
||||
launch(srvConfig.banner.link);
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
if (_shouldShowBanner && srvConfig.banner.expire != null) {
|
||||
_timer = Timer(
|
||||
Duration(seconds: srvConfig.banner.expire - time()), _hideBanner);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
if (_timer != null) _timer.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (!_shouldShowBanner) return Container();
|
||||
|
||||
final banner = srvConfig.banner;
|
||||
return Card(
|
||||
color: banner.nature == BannerNature.Information
|
||||
? Colors.blue
|
||||
: banner.nature == BannerNature.Success
|
||||
? Colors.green
|
||||
: Colors.red,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
child: Row(
|
||||
children: [
|
||||
BannerButton(
|
||||
icon: Icon(
|
||||
banner.nature == BannerNature.Information
|
||||
? Icons.info
|
||||
: banner.nature == BannerNature.Success
|
||||
? Icons.check
|
||||
: Icons.warning,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
banner.message.containsKey(shortLang)
|
||||
? banner.message[shortLang]
|
||||
: banner.message["en"],
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
),
|
||||
banner.link == null
|
||||
? Container()
|
||||
: BannerButton(
|
||||
onPressed: _openLink,
|
||||
icon: Icon(Icons.open_in_new),
|
||||
),
|
||||
BannerButton(
|
||||
onPressed: _hideBanner,
|
||||
icon: Icon(Icons.close),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class BannerButton extends StatelessWidget {
|
||||
final Function() onPressed;
|
||||
final Widget icon;
|
||||
|
||||
const BannerButton({this.onPressed, this.icon, Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return IconButton(
|
||||
onPressed: onPressed,
|
||||
icon: icon,
|
||||
color: Colors.white,
|
||||
disabledColor: Colors.white,
|
||||
padding: EdgeInsets.all(1.0),
|
||||
);
|
||||
}
|
||||
}
|
@ -75,7 +75,7 @@ class _CountdownWidgetState extends State<CountdownWidget> {
|
||||
value: remainingTime <= 0
|
||||
? 1.0
|
||||
: 1 - (remainingTime / totalDuration),
|
||||
backgroundColor: Theme.of(context).accentColor,
|
||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
Theme.of(context).backgroundColor),
|
||||
),
|
||||
|
@ -43,7 +43,6 @@ class LoginRoutesTheme extends StatelessWidget {
|
||||
backgroundColor: Config.get().splashBackgroundColor,
|
||||
disabledColor: Colors.grey,
|
||||
highlightColor: Colors.white12,
|
||||
accentColor: Colors.white,
|
||||
hintColor: Colors.white,
|
||||
textTheme: TextTheme(subtitle1: TextStyle(color: Colors.white)),
|
||||
radioTheme: RadioThemeData(
|
||||
@ -63,7 +62,7 @@ class LoginRoutesTheme extends StatelessWidget {
|
||||
onBackground: Colors.white,
|
||||
onError: Colors.redAccent,
|
||||
brightness: Brightness.dark,
|
||||
)),
|
||||
).copyWith(secondary: Colors.white)),
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import 'package:comunic/models/config.dart';
|
||||
import 'package:comunic/ui/widgets/banner_widget.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@ -43,40 +44,49 @@ class LoginScaffold extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
body: SingleChildScrollView(
|
||||
child: Center(
|
||||
child: Container(
|
||||
height: contentHeight,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: 300),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Spacer(flex: 3),
|
||||
Text(config().appName,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 50)),
|
||||
Spacer(flex: 1),
|
||||
Text(
|
||||
tr(config().appQuickDescription ??
|
||||
tr("Free social network that respect your privacy")),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
Spacer(flex: 3),
|
||||
child != null
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Material(
|
||||
child: child,
|
||||
color: Colors.indigo.shade500,
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
BannerWidget(),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Center(
|
||||
child: Container(
|
||||
height: contentHeight,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: 300),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Spacer(flex: 2),
|
||||
Text(config().appName,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 50)),
|
||||
Spacer(flex: 1),
|
||||
Text(
|
||||
tr(config().appQuickDescription ??
|
||||
tr("Free social network that respect your privacy")),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
)
|
||||
: Container(),
|
||||
noStyleChild ?? Container(),
|
||||
Spacer(flex: 3),
|
||||
],
|
||||
Spacer(flex: 3),
|
||||
child != null
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Material(
|
||||
child: child,
|
||||
color: Colors.indigo.shade500,
|
||||
),
|
||||
)
|
||||
: Container(),
|
||||
noStyleChild ?? Container(),
|
||||
Spacer(flex: 3),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -382,9 +382,9 @@ class _PostCreateFormWidgetState extends State<PostCreateFormWidget> {
|
||||
|
||||
this._resetForm();
|
||||
widget.onCreated();
|
||||
} catch (e) {
|
||||
} catch (e, s) {
|
||||
setState(() => _isCreating = false);
|
||||
print("Error while creating post : " + e.toString());
|
||||
print("Error while creating post : $e $s");
|
||||
showSimpleSnack(context, tr("Could not create post !"));
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class HeadSpacerSection extends CustomSection {
|
||||
HeadSpacerSection() : super(child: Container(height: 10));
|
||||
HeadSpacerSection() : super(child: Container(height: 10));
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import 'package:comunic/ui/dialogs/multi_choices_dialog.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
|
||||
/// Multiple choices settings tile
|
||||
///
|
||||
@ -14,7 +14,7 @@ class MultiChoicesSettingsTile<T> extends SettingsTile {
|
||||
final Widget leading;
|
||||
final Widget trailing;
|
||||
|
||||
const MultiChoicesSettingsTile({
|
||||
MultiChoicesSettingsTile({
|
||||
Key key,
|
||||
@required this.title,
|
||||
@required this.choices,
|
||||
|
@ -3,7 +3,7 @@ import 'package:comunic/utils/flutter_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/string_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
|
||||
/// Text edit settings tile
|
||||
///
|
||||
@ -22,7 +22,7 @@ class TextEditSettingsTile extends SettingsTile {
|
||||
|
||||
bool get readOnly => onChanged == null;
|
||||
|
||||
const TextEditSettingsTile({
|
||||
TextEditSettingsTile({
|
||||
Key key,
|
||||
@required this.title,
|
||||
@required this.currValue,
|
||||
@ -41,7 +41,7 @@ class TextEditSettingsTile extends SettingsTile {
|
||||
Widget build(BuildContext context) {
|
||||
return SettingsTile(
|
||||
title: title,
|
||||
subtitle: isIOS ? reduceString(currValue, 20) :currValue,
|
||||
subtitle: isIOS ? reduceString(currValue, 20) : currValue,
|
||||
onPressed: readOnly ? null : (_) => _changeValue(context),
|
||||
);
|
||||
}
|
||||
|
@ -44,7 +44,6 @@ class ConversationWindowContainer extends StatelessWidget {
|
||||
appBar: AppBarWrapper(
|
||||
height: 40,
|
||||
appBar: AppBar(
|
||||
textTheme: TextTheme(headline6: TextStyle(fontSize: 15)),
|
||||
backgroundColor: appBarBgColor,
|
||||
leading: icon,
|
||||
title: GestureDetector(child: title, onTap: onToggleCollapse),
|
||||
@ -52,6 +51,10 @@ class ConversationWindowContainer extends StatelessWidget {
|
||||
..add(
|
||||
IconButton(icon: Icon(Icons.close), onPressed: onClose),
|
||||
),
|
||||
toolbarTextStyle:
|
||||
TextTheme(headline6: TextStyle(fontSize: 15)).bodyText2,
|
||||
titleTextStyle:
|
||||
TextTheme(headline6: TextStyle(fontSize: 15)).headline6,
|
||||
)),
|
||||
body: Visibility(
|
||||
child: body,
|
||||
|
@ -16,7 +16,6 @@ import 'package:comunic/utils/date_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
|
||||
/// Tablet mode of user page
|
||||
///
|
||||
|
@ -1,5 +1,3 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:comunic/utils/input_utils.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
52
lib/utils/identicon_utils.dart
Normal file
52
lib/utils/identicon_utils.dart
Normal file
@ -0,0 +1,52 @@
|
||||
import 'dart:typed_data';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:jdenticon_dart/jdenticon_dart.dart';
|
||||
import 'package:random_string/random_string.dart';
|
||||
|
||||
/// Identicon utilities
|
||||
///
|
||||
/// @author Pierre Hubert
|
||||
|
||||
|
||||
// Based on https://stackoverflow.com/a/63215502/3781411
|
||||
Future<Uint8List> svgToPng(BuildContext context, String svgString,
|
||||
{int svgWidth, int svgHeight}) async {
|
||||
DrawableRoot svgDrawableRoot = await svg.fromSvgString(svgString, null);
|
||||
|
||||
// to have a nice rendering it is important to have the exact original height and width,
|
||||
// the easier way to retrieve it is directly from the svg string
|
||||
// but be careful, this is an ugly fix for a flutter_svg problem that works
|
||||
// with my images
|
||||
String temp = svgString.substring(svgString.indexOf('height="') + 8);
|
||||
int originalHeight =
|
||||
svgHeight ?? int.parse(temp.substring(0, temp.indexOf('p')));
|
||||
temp = svgString.substring(svgString.indexOf('width="') + 7);
|
||||
int originalWidth =
|
||||
svgWidth ?? int.parse(temp.substring(0, temp.indexOf('p')));
|
||||
|
||||
// toPicture() and toImage() don't seem to be pixel ratio aware, so we calculate the actual sizes here
|
||||
double devicePixelRatio = MediaQuery.of(context).devicePixelRatio;
|
||||
|
||||
double width = originalHeight *
|
||||
devicePixelRatio; // where 32 is your SVG's original width
|
||||
double height = originalWidth * devicePixelRatio; // same thing
|
||||
|
||||
// Convert to ui.Picture
|
||||
final picture = svgDrawableRoot.toPicture(size: Size(width, height));
|
||||
|
||||
// Convert to ui.Image. toImage() takes width and height as parameters
|
||||
// you need to find the best size to suit your needs and take into account the screen DPI
|
||||
final image = await picture.toImage(width.toInt(), height.toInt());
|
||||
ByteData bytes = await image.toByteData(format: ImageByteFormat.png);
|
||||
|
||||
return bytes.buffer.asUint8List();
|
||||
}
|
||||
|
||||
Future<Uint8List> genIdenticon(BuildContext context, {int size: 100}) async {
|
||||
final identicon = Jdenticon.toSvg(randomString(25), size: size);
|
||||
|
||||
return svgToPng(context, identicon, svgHeight: size, svgWidth: size);
|
||||
}
|
@ -48,3 +48,10 @@ String tr(String string, {Map<String, String> args}) {
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
/// Get current lang, in format aa_BB
|
||||
String get lang => _currLang != null ? _currLang : "en_US";
|
||||
|
||||
|
||||
/// Get short lang format, in format aa
|
||||
String get shortLang => lang.split("_")[0];
|
||||
|
@ -4,7 +4,6 @@ import 'package:comunic/ui/routes/single_post_route.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
/// Navigation utilities
|
||||
///
|
||||
|
271
pubspec.lock
271
pubspec.lock
@ -7,21 +7,21 @@ packages:
|
||||
name: archive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.13"
|
||||
version: "3.1.6"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.6.0"
|
||||
version: "2.3.0"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.6.1"
|
||||
version: "2.8.2"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -35,28 +35,42 @@ packages:
|
||||
name: cached_network_image
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.5.1"
|
||||
version: "3.2.0"
|
||||
cached_network_image_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cached_network_image_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
cached_network_image_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cached_network_image_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "1.2.0"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.3.1"
|
||||
chewie:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: chewie
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.2.2"
|
||||
chewie_audio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -98,14 +112,14 @@ packages:
|
||||
name: connectivity_for_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.0"
|
||||
version: "0.4.0+1"
|
||||
connectivity_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: connectivity_macos
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.0"
|
||||
version: "0.2.1+2"
|
||||
connectivity_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -113,33 +127,40 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
convert:
|
||||
cross_file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: convert
|
||||
name: cross_file
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "0.3.2"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.5"
|
||||
version: "3.0.1"
|
||||
csslib:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: csslib
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.17.0"
|
||||
version: "0.17.1"
|
||||
cupertino_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: cupertino_icons
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
dart_webrtc:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dart_webrtc
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
@ -147,7 +168,7 @@ packages:
|
||||
name: dio
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
version: "4.0.4"
|
||||
emoji_picker:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -175,21 +196,21 @@ packages:
|
||||
name: ffi
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
version: "1.1.2"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.1.1"
|
||||
version: "6.1.2"
|
||||
file_picker:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: file_picker
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.2+2"
|
||||
version: "4.3.0"
|
||||
filesize:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -203,42 +224,42 @@ packages:
|
||||
name: firebase_core
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.10.6"
|
||||
firebase_core_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_core_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
version: "4.2.3"
|
||||
firebase_core_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_core_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "1.5.3"
|
||||
firebase_messaging:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: firebase_messaging
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "10.0.0"
|
||||
version: "11.2.4"
|
||||
firebase_messaging_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_messaging_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.1.4"
|
||||
firebase_messaging_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_messaging_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.2.5"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@ -250,21 +271,21 @@ packages:
|
||||
name: flutter_blurhash
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.5.0"
|
||||
version: "0.6.0"
|
||||
flutter_cache_manager:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_cache_manager
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
version: "3.3.0"
|
||||
flutter_colorpicker:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_colorpicker
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.0"
|
||||
version: "1.0.3"
|
||||
flutter_emoji:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -278,14 +299,28 @@ packages:
|
||||
name: flutter_launcher_icons
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.8.1"
|
||||
version: "0.9.2"
|
||||
flutter_plugin_android_lifecycle:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_plugin_android_lifecycle
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
version: "2.0.5"
|
||||
flutter_settings_ui:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_settings_ui
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
flutter_svg:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_svg
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@ -302,7 +337,7 @@ packages:
|
||||
name: flutter_webrtc
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.6.3"
|
||||
version: "0.8.0"
|
||||
html:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -316,7 +351,7 @@ packages:
|
||||
name: http
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.13.3"
|
||||
version: "0.13.4"
|
||||
http_parser:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -324,48 +359,41 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
identicon:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: identicon
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.1"
|
||||
image:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.19"
|
||||
version: "3.1.0"
|
||||
image_cropper:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: image_cropper
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
version: "1.4.1"
|
||||
image_picker:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: image_picker
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.7.5+3"
|
||||
version: "0.8.4+4"
|
||||
image_picker_for_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image_picker_for_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.1.4"
|
||||
image_picker_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image_picker_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.4.1"
|
||||
intl:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -373,6 +401,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.17.0"
|
||||
jdenticon_dart:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: jdenticon_dart
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -386,21 +421,21 @@ packages:
|
||||
name: matcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.10"
|
||||
version: "0.12.11"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
version: "1.7.0"
|
||||
mime:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: mime
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
version: "1.0.1"
|
||||
nested:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -414,7 +449,7 @@ packages:
|
||||
name: octo_image
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
version: "1.0.1"
|
||||
package_info:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -429,27 +464,55 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
path_drawing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_drawing
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
path_parsing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_parsing
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
path_provider:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: path_provider
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
version: "2.0.8"
|
||||
path_provider_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_android
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.11"
|
||||
path_provider_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_ios
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.7"
|
||||
path_provider_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_linux
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.1.4"
|
||||
path_provider_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_macos
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.4"
|
||||
path_provider_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -463,70 +526,70 @@ packages:
|
||||
name: path_provider_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
version: "2.0.4"
|
||||
pedantic:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pedantic
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.11.0"
|
||||
version: "1.11.1"
|
||||
permission_handler:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: permission_handler
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "8.0.0+2"
|
||||
version: "8.3.0"
|
||||
permission_handler_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: permission_handler_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.5.0"
|
||||
version: "3.7.0"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
version: "4.4.0"
|
||||
photo_view:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: photo_view
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.11.1"
|
||||
version: "0.13.0"
|
||||
pie_chart:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: pie_chart
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.0.0"
|
||||
version: "5.1.0"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: platform
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.1.0"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: plugin_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.2"
|
||||
process:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: process
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.2.1"
|
||||
version: "4.2.4"
|
||||
provider:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -540,28 +603,21 @@ packages:
|
||||
name: random_string
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.3.1"
|
||||
record_mp3:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: record_mp3
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "3.0.0"
|
||||
rxdart:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: rxdart
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.25.0"
|
||||
settings_ui:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: settings_ui
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
version: "0.27.3"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -615,14 +671,14 @@ packages:
|
||||
name: sqflite
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0+3"
|
||||
version: "2.0.1"
|
||||
sqflite_common:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqflite_common
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0+2"
|
||||
version: "2.1.0"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -657,7 +713,7 @@ packages:
|
||||
name: table_calendar
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.0.3"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -671,7 +727,7 @@ packages:
|
||||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
version: "0.4.3"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -685,56 +741,70 @@ packages:
|
||||
name: url_launcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.0.4"
|
||||
version: "6.0.17"
|
||||
url_launcher_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.0.13"
|
||||
url_launcher_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_ios
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.0.13"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_linux
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.2"
|
||||
url_launcher_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_macos
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.2"
|
||||
url_launcher_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.3"
|
||||
version: "2.0.4"
|
||||
url_launcher_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.5"
|
||||
url_launcher_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.2"
|
||||
uuid:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: uuid
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
version: "3.0.5"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.1"
|
||||
version:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -748,77 +818,84 @@ packages:
|
||||
name: video_player
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
version: "2.2.10"
|
||||
video_player_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.1.0"
|
||||
version: "5.0.0"
|
||||
video_player_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.5"
|
||||
video_thumbnail:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: video_thumbnail
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.3"
|
||||
version: "0.4.3"
|
||||
wakelock:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: wakelock
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.5.2"
|
||||
version: "0.5.6"
|
||||
wakelock_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: wakelock_macos
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.0+1"
|
||||
version: "0.4.0"
|
||||
wakelock_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: wakelock_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.1+1"
|
||||
version: "0.3.0"
|
||||
wakelock_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: wakelock_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.0+1"
|
||||
version: "0.4.0"
|
||||
wakelock_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: wakelock_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.0"
|
||||
version: "0.2.0"
|
||||
web_socket_channel:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: web_socket_channel
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "2.1.0"
|
||||
webrtc_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webrtc_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.3.3"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -832,14 +909,14 @@ packages:
|
||||
name: xml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.5.1"
|
||||
version: "5.3.1"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
version: "3.1.0"
|
||||
sdks:
|
||||
dart: ">=2.13.0 <3.0.0"
|
||||
flutter: ">=2.0.0"
|
||||
dart: ">=2.15.0 <3.0.0"
|
||||
flutter: ">=2.5.0"
|
||||
|
31
pubspec.yaml
31
pubspec.yaml
@ -11,7 +11,7 @@ description: Comunic client
|
||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
version: 1.1.9+16
|
||||
version: 1.1.10+17
|
||||
|
||||
environment:
|
||||
sdk: ">=2.7.0 <3.0.0"
|
||||
@ -31,14 +31,14 @@ dependencies:
|
||||
sqflite: ^2.0.0+2
|
||||
|
||||
# Image picker is used whenever the user wants to send an image
|
||||
image_picker: ^0.7.2+1
|
||||
image_picker: ^0.8.4+4
|
||||
|
||||
# The HTTP client is used to make requests on the Comunic API
|
||||
dio: ^4.0.0-beta7
|
||||
http_parser: ^4.0.0
|
||||
|
||||
# This plugins allows to load remote images
|
||||
cached_network_image: ^2.0.0
|
||||
cached_network_image: ^3.2.0
|
||||
|
||||
# URL launcher is useful to open URL in the phone browser
|
||||
url_launcher: ^6.0.2
|
||||
@ -56,34 +56,37 @@ dependencies:
|
||||
flutter_emoji: ^2.2.1+1
|
||||
|
||||
# Build settings UI
|
||||
settings_ui: ^1.0.0
|
||||
flutter_settings_ui: ^2.0.1
|
||||
|
||||
# Generate identicons
|
||||
identicon: ^0.1.1
|
||||
jdenticon_dart: ^2.0.0
|
||||
|
||||
# Render SVG images
|
||||
flutter_svg: ^1.0.0
|
||||
|
||||
# Generate random strings
|
||||
random_string: ^2.0.1
|
||||
|
||||
# Display zoomable images
|
||||
photo_view: ^0.11.1
|
||||
photo_view: ^0.13.0
|
||||
|
||||
# Check Internet connection
|
||||
connectivity: ^3.0.2
|
||||
|
||||
# Establish WebSocket connections
|
||||
web_socket_channel: ^1.1.0
|
||||
web_socket_channel: ^2.1.0
|
||||
|
||||
# Events manager
|
||||
event_bus: ^2.0.0
|
||||
|
||||
# WebRTC calls
|
||||
flutter_webrtc: ^0.6.3
|
||||
flutter_webrtc: ^0.8.0
|
||||
|
||||
# Prevent phone from auto-locking during calls
|
||||
wakelock: ^0.5.2
|
||||
|
||||
# Pick any kind of file
|
||||
file_picker: ^3.0.0
|
||||
file_picker: ^4.3.0
|
||||
|
||||
# Get information about current version
|
||||
package_info: ^2.0.0
|
||||
@ -109,10 +112,10 @@ dependencies:
|
||||
mime: ^1.0.0
|
||||
|
||||
# Create video thumbnails
|
||||
video_thumbnail: ^0.3.3
|
||||
video_thumbnail: ^0.4.3
|
||||
|
||||
# Record audio file
|
||||
record_mp3: ^2.1.0
|
||||
record_mp3: ^3.0.0
|
||||
|
||||
# Request permissions
|
||||
permission_handler: ^8.0.0+2
|
||||
@ -121,14 +124,14 @@ dependencies:
|
||||
emoji_picker: ^0.1.0
|
||||
|
||||
# Color picker
|
||||
flutter_colorpicker: ^0.4.0
|
||||
flutter_colorpicker: ^1.0.3
|
||||
|
||||
# Image cropper
|
||||
image_cropper: ^1.4.0
|
||||
|
||||
# Firebase cloud messaging (for push notifications)
|
||||
firebase_core: ^1.0.1
|
||||
firebase_messaging: ^10.0.0
|
||||
firebase_messaging: ^11.2.4
|
||||
|
||||
# Forez presence
|
||||
table_calendar: ^3.0.0
|
||||
@ -138,7 +141,7 @@ dev_dependencies:
|
||||
sdk: flutter
|
||||
|
||||
# Generate iOS application icons
|
||||
flutter_launcher_icons: ^0.8.1
|
||||
flutter_launcher_icons: ^0.9.2
|
||||
|
||||
flutter_icons:
|
||||
android: false
|
||||
|
Reference in New Issue
Block a user