Update
Logging data Try-catch function
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import '../../product/constant/app/app_constants.dart';
|
||||
import '../../product/shared/shared_loading_animation.dart';
|
||||
import '../../product/shared/shared_snack_bar.dart';
|
||||
import 'profile/profile_screen.dart';
|
||||
import '../../product/constant/icon/icon_constants.dart';
|
||||
import '../../product/extension/context_extension.dart';
|
||||
@@ -29,7 +27,6 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
settingsBloc = BlocProvider.of(context);
|
||||
// getUserProfile();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -41,7 +38,6 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
),
|
||||
body: StreamBuilder<User>(
|
||||
stream: settingsBloc.streamUserProfile,
|
||||
// initialData: user,
|
||||
builder: (context, userSnapshot) {
|
||||
if (userSnapshot.data == null) {
|
||||
settingsBloc.getUserProfile(context);
|
||||
@@ -139,17 +135,6 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
// void getUserProfile() async {
|
||||
// try {
|
||||
// user = await apiServices.getUserDetail();
|
||||
// settingsBloc.sinkUserProfile.add(user);
|
||||
// } catch (e) {
|
||||
// if (!mounted) return;
|
||||
// showErrorTopSnackBarCustom(
|
||||
// context, e.toString());
|
||||
// }
|
||||
// }
|
||||
|
||||
String getAvatarContent(String username) {
|
||||
String name = "";
|
||||
if (username.isNotEmpty) {
|
||||
|
||||
Reference in New Issue
Block a user