Skip to content

Commit

Permalink
Partial migration to new deps
Browse files Browse the repository at this point in the history
  • Loading branch information
RblSb committed Jan 29, 2024
1 parent 420f9c9 commit ef6c563
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 98 deletions.
10 changes: 5 additions & 5 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
direction: orientation == Orientation.landscape
? Axis.horizontal
: Axis.vertical,
children: <Widget>[
children: [
Selector<AppModel, bool>(
selector: (context, app) => app.isChatVisible,
builder: (context, isChatVisible, child) {
Expand Down Expand Up @@ -155,7 +155,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
visible: isChatVisible,
child: Expanded(
child: Column(
children: <Widget>[
children: [
if (orientation == Orientation.portrait &&
!_isKeyboardVisible())
ChatPanel(),
Expand Down Expand Up @@ -248,7 +248,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
builder: (context) => AlertDialog(
title: const Text('Are you sure?'),
content: const Text('Do you want to exit channel?'),
actions: <Widget>[
actions: [
TextButton(
onPressed: () => Navigator.of(context).pop(false),
child: const Text('No'),
Expand Down Expand Up @@ -302,7 +302,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
children: [
TextFormField(
initialValue: data.item.url,
autofocus: url == defaultUrl,
Expand All @@ -327,7 +327,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
],
),
),
actions: <Widget>[
actions: [
TextButton(
child: const Text('Queue next'),
onPressed: () {
Expand Down
2 changes: 1 addition & 1 deletion lib/chat_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ChatPanel extends StatelessWidget {
// padding: EdgeInsets.symmetric(horizontal: paddingNum),
color: Theme.of(context).chatPanelBackground,
child: Row(
children: <Widget>[
children: [
const Spacer(flex: 3),
IconButton(
onPressed: () => panel.togglePanel(MainTab.playlist),
Expand Down
6 changes: 3 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Main extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = ThemeData.from(
// useMaterial3: true,
useMaterial3: false,
colorScheme: ColorScheme.fromSwatch(
brightness: Brightness.dark,
primarySwatch: Colors.blue,
Expand Down Expand Up @@ -62,7 +62,8 @@ class ServerListPage extends StatefulWidget {
class _ServerListPageState extends State<ServerListPage> {
final List<ServerListItem> items = [];
Offset? _tapPosition;
final latestApkUrl = 'https://tube.syncme.site/SyncTubeApp/SyncTube.apk';
final latestApkUrl = 'http://82.146.45.136/SyncTubeApp/SyncTube.apk';
final pubspecUrl = 'http://82.146.45.136/SyncTubeApp/pubspec.yaml';

@override
void initState() {
Expand Down Expand Up @@ -384,7 +385,6 @@ class _ServerListPageState extends State<ServerListPage> {
}

Future<int> checkUpdateBuildNumber() async {
final pubspecUrl = 'https://tube.syncme.site/SyncTubeApp/pubspec.yaml';
http.Response res;
try {
res = await http.get(Uri.parse(pubspecUrl)).timeout(Duration(seconds: 5));
Expand Down
6 changes: 3 additions & 3 deletions lib/playlist.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'wsdata.dart';
class Playlist extends StatelessWidget {
const Playlist({Key? key}) : super(key: key);

Widget plailistItem(
Widget playlistItem(
BuildContext context,
PlaylistModel playlist, {
required VideoList item,
Expand Down Expand Up @@ -42,7 +42,7 @@ class Playlist extends StatelessWidget {
),
padding: containerPadding,
child: Wrap(
children: <Widget>[
children: [
GestureDetector(
onLongPress: () {
Clipboard.setData(ClipboardData(text: item.url));
Expand Down Expand Up @@ -157,7 +157,7 @@ class Playlist extends StatelessWidget {
itemCount: playlist.length,
itemBuilder: (context, index) {
final item = playlist.getItem(index)!;
return plailistItem(
return playlistItem(
context,
playlist,
item: item,
Expand Down
2 changes: 1 addition & 1 deletion lib/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Settings extends StatelessWidget {
Widget build(BuildContext context) {
final app = context.watch<AppModel>();
return ListView(
children: <Widget>[
children: [
ListTile(
title: const Text('Orientation'),
trailing: Text('${app.prefferedOrientationType()}'),
Expand Down
Loading

0 comments on commit ef6c563

Please sign in to comment.