Skip to content

Commit

Permalink
Use hintText for TextField.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 8, 2020
1 parent b73b352 commit 0cf631f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## latest

* 2020-11-08, Use hintText for TextField.
* 2020-11-08, Use ListView for flex items.
* 2020-11-08, Refine ListTile ui, no padding.
* 2020-11-08, Disable play button, if url is invalid.
Expand Down
5 changes: 4 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ class UrlInputDisplay extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
child: TextField(controller: _controller, autofocus: false),
child: TextField(
controller: _controller, autofocus: false,
decoration: InputDecoration(hintText: 'Please select or input url...')
),
padding: EdgeInsets.fromLTRB(5, 0, 5, 0),
);
}
Expand Down
15 changes: 8 additions & 7 deletions lib/flutter_live.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,29 @@ import 'dart:async';

import 'package:flutter/services.dart';

/// The live streaming tools for flutter.
class FlutterLive {
// The channel for platform.
/// The channel for platform.
static const MethodChannel _channel = const MethodChannel('flutter_live');

// Get the platform information.
/// Get the platform information.
static Future<String> get platformVersion async {
final String version = await _channel.invokeMethod('getPlatformVersion');
return version;
}

// RTMP demo stream by https://ossrs.net/
/// RTMP demo stream by https://ossrs.net/
static const String rtmp = 'rtmp://r.ossrs.net/live/livestream';

// HLS demo stream by https://ossrs.net/
/// HLS demo stream by https://ossrs.net/
static const String hls = 'http://r.ossrs.net/live/livestream.m3u8';

// HTTP-FLV demo stream by https://ossrs.net/
/// HTTP-FLV demo stream by https://ossrs.net/
static const String flv = 'http://r.ossrs.net/live/livestream.flv';

// HTTPS-FLV demo stream by https://ossrs.net/
/// HTTPS-FLV demo stream by https://ossrs.net/
static const String flvs = 'https://d.ossrs.net:18088/live/livestream.flv';

// HTTPS-HLS demo stream by https://ossrs.net/
/// HTTPS-HLS demo stream by https://ossrs.net/
static const String hlss = 'https://d.ossrs.net:18088/live/livestream.m3u8';
}

0 comments on commit 0cf631f

Please sign in to comment.