This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----- index.wxml | |
<!--index.wxml--> | |
<view class="container"> | |
<view | |
class="usermotto" | |
style="position: absolute; left: {{left}}px; top: {{top}}px;" | |
bindtouchstart="touchStart" | |
bindtouchmove="touchMove" | |
bindtouchend="touchEnd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
class RiverPodDemoPage extends ConsumerStatefulWidget { | |
@override | |
_RiverPodDemoPageState createState() => _RiverPodDemoPageState(); | |
} | |
class _RiverPodDemoPageState extends ConsumerState<RiverPodDemoPage> { | |
@override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class _CustomColumnSeriesRenderer extends ColumnSeriesRenderer { | |
@override | |
ChartSegment createSegment() { | |
return _ColumnCustomPainter(); | |
} | |
} | |
class _ColumnCustomPainter extends ColumnSegment { | |
Paint _fillPaint = Paint(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class _CustomLineSeriesRenderer extends ColumnSeriesRenderer { | |
@override | |
ChartSegment createSegment() { | |
return _ColumnLinePainter(); | |
} | |
} | |
class _ColumnLinePainter extends ColumnSegment { | |
Paint _fillPaint = Paint(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:flutter/services.dart'; | |
class Flutterplugin17 { | |
static const MethodChannel _channel = | |
const MethodChannel('flutterplugin17'); | |
static Future<String> get platformVersion async { | |
final String version = await _channel.invokeMethod('getPlatformVersion'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.lsl.flutterplugin17; | |
import android.util.Log; | |
import java.lang.reflect.Method; | |
/** | |
* Created by liusilong on 2020/5/9. | |
* version:1.0 | |
* Describe: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.lsl.flutterplugin17; | |
import androidx.annotation.NonNull; | |
import io.flutter.embedding.engine.plugins.FlutterPlugin; | |
import io.flutter.plugin.common.MethodCall; | |
import io.flutter.plugin.common.MethodChannel; | |
import io.flutter.plugin.common.MethodChannel.MethodCallHandler; | |
import io.flutter.plugin.common.MethodChannel.Result; | |
import io.flutter.plugin.common.PluginRegistry.Registrar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Demo1 { | |
public static void main(String[] args) { | |
MyBouncedBuffered bouncedBuffered = new MyBouncedBuffered(); | |
Thread putThread = new Thread(() -> { | |
while (true) { | |
String value = String.valueOf(new Random().nextInt(100)); | |
try { | |
bouncedBuffered.put(value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class GetWidgetWidthAndHeiget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: HomePage(), | |
); | |
} | |
} |
NewerOlder