Renames due to type error, upgrade packages
This commit is contained in:
parent
262f151b07
commit
7e3cbf9ed9
11 changed files with 28 additions and 28 deletions
|
|
@ -19,7 +19,7 @@ class SevenTVApi {
|
|||
final decoded = jsonDecode(response.body) as List;
|
||||
final emotes = decoded.map((emote) => Emote7TV.fromJson(emote));
|
||||
|
||||
return emotes.map((emote) => Emote.from7TV(emote, EmoteType.sevenTvGlobal)).toList();
|
||||
return emotes.map((emote) => Emote.from7TV(emote, EmoteType.sevenTVGlobal)).toList();
|
||||
} else {
|
||||
return Future.error('Failed to get 7TV global emotes');
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ class SevenTVApi {
|
|||
final decoded = jsonDecode(response.body) as List;
|
||||
final emotes = decoded.map((emote) => Emote7TV.fromJson(emote));
|
||||
|
||||
return emotes.map((emote) => Emote.from7TV(emote, EmoteType.sevenTvChannel)).toList();
|
||||
return emotes.map((emote) => Emote.from7TV(emote, EmoteType.sevenTVChannel)).toList();
|
||||
} else {
|
||||
return Future.error('Failed to get 7TV channel emotes');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ Future<void> main() async {
|
|||
final twitchApiService = TwitchApi(client);
|
||||
final bttvApiService = BTTVApi(client);
|
||||
final ffzApiService = FFZApi(client);
|
||||
final sevenTvApiService = SevenTVApi(client);
|
||||
final sevenTVApiService = SevenTVApi(client);
|
||||
|
||||
// Create and initialize the authentication store
|
||||
final authStore = AuthStore(twitchApi: twitchApiService);
|
||||
|
|
@ -59,7 +59,7 @@ Future<void> main() async {
|
|||
Provider<TwitchApi>(create: (_) => twitchApiService),
|
||||
Provider<BTTVApi>(create: (_) => bttvApiService),
|
||||
Provider<FFZApi>(create: (_) => ffzApiService),
|
||||
Provider<SevenTVApi>(create: (_) => sevenTvApiService),
|
||||
Provider<SevenTVApi>(create: (_) => sevenTVApiService),
|
||||
],
|
||||
child: const MyApp(),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ class Badge {
|
|||
factory Badge.from7TV(BadgeInfo7TV badge) => Badge(
|
||||
name: badge.tooltip,
|
||||
url: badge.urls[2][1],
|
||||
type: BadgeType.sevenTv,
|
||||
type: BadgeType.sevenTV,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -167,5 +167,5 @@ enum BadgeType {
|
|||
twitch,
|
||||
bttv,
|
||||
ffz,
|
||||
sevenTv,
|
||||
sevenTV,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -315,6 +315,6 @@ enum EmoteType {
|
|||
bttvGlobal,
|
||||
bttvChannel,
|
||||
bttvShared,
|
||||
sevenTvGlobal,
|
||||
sevenTvChannel,
|
||||
sevenTVGlobal,
|
||||
sevenTVChannel,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class EmoteMenu extends StatelessWidget {
|
|||
Observer(
|
||||
builder: (_) => EmoteMenuPanel(
|
||||
textController: textController,
|
||||
emotes: assetsStore.sevenTvEmotes,
|
||||
emotes: assetsStore.sevenTVEmotes,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class EmoteMenuPanel extends StatelessWidget {
|
|||
emote.type == EmoteType.twitchGlobal ||
|
||||
emote.type == EmoteType.bttvGlobal ||
|
||||
emote.type == EmoteType.ffzGlobal ||
|
||||
emote.type == EmoteType.sevenTvGlobal)
|
||||
emote.type == EmoteType.sevenTVGlobal)
|
||||
.toList();
|
||||
|
||||
final channelEmotes = emotes
|
||||
|
|
@ -25,7 +25,7 @@ class EmoteMenuPanel extends StatelessWidget {
|
|||
emote.type == EmoteType.bttvChannel ||
|
||||
emote.type == EmoteType.bttvShared ||
|
||||
emote.type == EmoteType.ffzChannel ||
|
||||
emote.type == EmoteType.sevenTvChannel)
|
||||
emote.type == EmoteType.sevenTVChannel)
|
||||
.toList();
|
||||
|
||||
final subEmotes = emotes.where((emote) => emote.type == EmoteType.twitchSub).toList();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ abstract class _ChatAssetsStoreBase with Store {
|
|||
final TwitchApi twitchApi;
|
||||
final BTTVApi bttvApi;
|
||||
final FFZApi ffzApi;
|
||||
final SevenTVApi sevenTvApi;
|
||||
final SevenTVApi sevenTVApi;
|
||||
|
||||
/// Contains any custom FFZ mod and vip badges for the channel.
|
||||
RoomFFZ? ffzRoomInfo;
|
||||
|
|
@ -26,7 +26,7 @@ abstract class _ChatAssetsStoreBase with Store {
|
|||
List<Emote> get ffzEmotes => _emoteToObject.values.where((emote) => isFFZ(emote)).toList();
|
||||
|
||||
@computed
|
||||
List<Emote> get sevenTvEmotes => _emoteToObject.values.where((emote) => is7TV(emote)).toList();
|
||||
List<Emote> get sevenTVEmotes => _emoteToObject.values.where((emote) => is7TV(emote)).toList();
|
||||
|
||||
/// The map of badges ids to their object representation.
|
||||
final twitchBadgesToObject = ObservableMap<String, Badge>();
|
||||
|
|
@ -68,14 +68,14 @@ abstract class _ChatAssetsStoreBase with Store {
|
|||
}
|
||||
|
||||
bool is7TV(Emote emote) {
|
||||
return emote.type == EmoteType.sevenTvChannel || emote.type == EmoteType.sevenTvGlobal;
|
||||
return emote.type == EmoteType.sevenTVChannel || emote.type == EmoteType.sevenTVGlobal;
|
||||
}
|
||||
|
||||
_ChatAssetsStoreBase({
|
||||
required this.twitchApi,
|
||||
required this.bttvApi,
|
||||
required this.ffzApi,
|
||||
required this.sevenTvApi,
|
||||
required this.sevenTVApi,
|
||||
});
|
||||
|
||||
/// Fetches global and channel assets (badges and emotes) and stores them in [_emoteToUrl]
|
||||
|
|
@ -119,8 +119,8 @@ abstract class _ChatAssetsStoreBase with Store {
|
|||
bttvApi.getEmotesChannel(id: channelId).catchError(onError),
|
||||
twitchApi.getEmotesGlobal(headers: headers).catchError(onError),
|
||||
twitchApi.getEmotesChannel(id: channelId, headers: headers).catchError(onError),
|
||||
sevenTvApi.getEmotesGlobal().catchError(onError),
|
||||
sevenTvApi.getEmotesChannel(user: channelName).catchError(onError),
|
||||
sevenTVApi.getEmotesGlobal().catchError(onError),
|
||||
sevenTVApi.getEmotesChannel(user: channelName).catchError(onError),
|
||||
ffzApi.getRoomInfo(name: channelName).then((ffzRoom) {
|
||||
ffzRoomInfo = ffzRoom.item1;
|
||||
return ffzRoom.item2;
|
||||
|
|
@ -139,7 +139,7 @@ abstract class _ChatAssetsStoreBase with Store {
|
|||
.then((badges) => twitchBadgesToObject.addAll(badges))
|
||||
.then((_) => twitchApi.getBadgesChannel(id: channelId).then((badges) => twitchBadgesToObject.addAll(badges)).catchError(onError)),
|
||||
ffzApi.getBadges().then((badges) => _userToFFZBadges = badges).catchError(onError),
|
||||
sevenTvApi.getBadges().then((badges) => _userTo7TVBadges = badges).catchError(onError),
|
||||
sevenTVApi.getBadges().then((badges) => _userTo7TVBadges = badges).catchError(onError),
|
||||
bttvApi.getBadges().then((badges) => _userToBTTVBadges = badges).catchError(onError),
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@ mixin _$ChatAssetsStore on _ChatAssetsStoreBase, Store {
|
|||
(_$ffzEmotesComputed ??= Computed<List<Emote>>(() => super.ffzEmotes,
|
||||
name: '_ChatAssetsStoreBase.ffzEmotes'))
|
||||
.value;
|
||||
Computed<List<Emote>>? _$sevenTvEmotesComputed;
|
||||
Computed<List<Emote>>? _$sevenTVEmotesComputed;
|
||||
|
||||
@override
|
||||
List<Emote> get sevenTvEmotes => (_$sevenTvEmotesComputed ??=
|
||||
Computed<List<Emote>>(() => super.sevenTvEmotes,
|
||||
name: '_ChatAssetsStoreBase.sevenTvEmotes'))
|
||||
List<Emote> get sevenTVEmotes => (_$sevenTVEmotesComputed ??=
|
||||
Computed<List<Emote>>(() => super.sevenTVEmotes,
|
||||
name: '_ChatAssetsStoreBase.sevenTVEmotes'))
|
||||
.value;
|
||||
|
||||
final _$_emoteToObjectAtom =
|
||||
|
|
@ -232,7 +232,7 @@ emoteMenuIndex: ${emoteMenuIndex},
|
|||
showEmoteMenu: ${showEmoteMenu},
|
||||
bttvEmotes: ${bttvEmotes},
|
||||
ffzEmotes: ${ffzEmotes},
|
||||
sevenTvEmotes: ${sevenTvEmotes}
|
||||
sevenTVEmotes: ${sevenTVEmotes}
|
||||
''';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class SearchResultsChannels extends StatelessWidget {
|
|||
twitchApi: context.read<TwitchApi>(),
|
||||
ffzApi: context.read<FFZApi>(),
|
||||
bttvApi: context.read<BTTVApi>(),
|
||||
sevenTvApi: context.read<SevenTVApi>(),
|
||||
sevenTVApi: context.read<SevenTVApi>(),
|
||||
),
|
||||
auth: searchStore.authStore,
|
||||
settings: context.read<SettingsStore>(),
|
||||
|
|
@ -120,7 +120,7 @@ class SearchResultsChannels extends StatelessWidget {
|
|||
twitchApi: context.read<TwitchApi>(),
|
||||
ffzApi: context.read<FFZApi>(),
|
||||
bttvApi: context.read<BTTVApi>(),
|
||||
sevenTvApi: context.read<SevenTVApi>(),
|
||||
sevenTVApi: context.read<SevenTVApi>(),
|
||||
),
|
||||
auth: searchStore.authStore,
|
||||
settings: context.read<SettingsStore>(),
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class StreamCard extends StatelessWidget {
|
|||
twitchApi: context.read<TwitchApi>(),
|
||||
ffzApi: context.read<FFZApi>(),
|
||||
bttvApi: context.read<BTTVApi>(),
|
||||
sevenTvApi: context.read<SevenTVApi>(),
|
||||
sevenTVApi: context.read<SevenTVApi>(),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ packages:
|
|||
name: built_value
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "8.1.3"
|
||||
version: "8.1.4"
|
||||
cached_network_image:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1007,7 +1007,7 @@ packages:
|
|||
name: win32
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.3.3"
|
||||
version: "2.3.4"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue