diff --git a/lib/constants.dart b/lib/constants.dart index 278038d0..6793aebd 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -1 +1,53 @@ +import 'package:frosty/models/channel.dart'; + +/// The twitch IRC websocket channel const twitchIrc = 'wss://irc-ws.chat.twitch.tv:443'; + +/// Sample channel objects for testing/preview purposes. +const SampleChannels = [ + Channel( + id: '', + userId: '', + userLogin: 'xqcow', + userName: 'xQcOW', + gameId: '', + gameName: 'VALORANT', + type: 'live', + title: 'TITANIC MAN WITH UNREAL UNMATCHED UNBELIEVABLE STRENGHT AND APTITUDE ACCOMPLISHES ACHIEVEMENTS DEEMED IMPOSSIBLE BY THE PUBLIC (GONE WRONG)', + viewerCount: 76422, + startedAt: '', + language: 'en', + thumbnailUrl: 'https://static-cdn.jtvnw.net/previews-ttv/live_user_xqcow-{width}x{height}.jpg', + tagIds: [], + isMature: false), + Channel( + id: '', + userId: '', + userLogin: 'lirik', + userName: 'Lirik', + gameId: '', + gameName: 'Just Chatting', + type: 'live', + title: 'LOL', + viewerCount: 11933, + startedAt: '', + language: 'en', + thumbnailUrl: 'https://static-cdn.jtvnw.net/previews-ttv/live_user_lirik-{width}x{height}.jpg', + tagIds: [], + isMature: false), + Channel( + id: '', + userId: '', + userLogin: 'mizkif', + userName: 'Mizkif', + gameId: '', + gameName: 'Just Chatting', + type: 'live', + title: 'DRAMA DRAMA DRAMA', + viewerCount: 4547, + startedAt: '', + language: 'en', + thumbnailUrl: 'https://static-cdn.jtvnw.net/previews-ttv/live_user_mizkif-{width}x{height}.jpg', + tagIds: [], + isMature: false) +]; diff --git a/pubspec.lock b/pubspec.lock index 489d7a65..344f8756 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -221,6 +221,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.0" + http: + dependency: "direct main" + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.3" http_multi_server: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index ac24a2a4..07e656ce 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -29,6 +29,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 + http: ^0.13.3 dev_dependencies: flutter_test: