fix: space bugs in some panels
This commit is contained in:
@@ -3,10 +3,13 @@ import 'dart:convert';
|
|||||||
import 'package:dartx/dartx.dart';
|
import 'package:dartx/dartx.dart';
|
||||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
import 'package:loggy/loggy.dart';
|
||||||
|
|
||||||
part 'profile.freezed.dart';
|
part 'profile.freezed.dart';
|
||||||
part 'profile.g.dart';
|
part 'profile.g.dart';
|
||||||
|
|
||||||
|
final _loggy = Loggy('Profile');
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class Profile with _$Profile {
|
class Profile with _$Profile {
|
||||||
const Profile._();
|
const Profile._();
|
||||||
@@ -27,6 +30,7 @@ class Profile with _$Profile {
|
|||||||
String url,
|
String url,
|
||||||
Map<String, List<String>> headers,
|
Map<String, List<String>> headers,
|
||||||
) {
|
) {
|
||||||
|
_loggy.debug("Profile Headers: $headers");
|
||||||
final titleHeader = headers['profile-title']?.single;
|
final titleHeader = headers['profile-title']?.single;
|
||||||
var title = '';
|
var title = '';
|
||||||
if (titleHeader != null) {
|
if (titleHeader != null) {
|
||||||
@@ -129,8 +133,9 @@ class SubscriptionInfo with _$SubscriptionInfo {
|
|||||||
final values = header.split(';');
|
final values = header.split(';');
|
||||||
final map = {
|
final map = {
|
||||||
for (final v in values)
|
for (final v in values)
|
||||||
v.split('=').first: int.tryParse(v.split('=').second),
|
v.split('=').first.trim(): int.tryParse(v.split('=').second.trim()),
|
||||||
};
|
};
|
||||||
|
_loggy.debug("Subscription Info: $map");
|
||||||
return SubscriptionInfo.fromJson(map);
|
return SubscriptionInfo.fromJson(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user