refactor: rename
This commit is contained in:
parent
88241f8ecc
commit
8cb6189a1a
11 changed files with 35 additions and 22 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
A texture helper which brings a high level api to handle RGBA data.
|
||||
|
||||

|
||||
|
||||
## Platform Support
|
||||
|
||||
- [x] Linux
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:texture_rgba_renderer/texture_rgba_renderer.dart';
|
||||
import 'package:flutter_texture_rgba_renderer/texture_rgba_renderer.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const MyApp());
|
||||
|
|
@ -96,7 +96,7 @@ class _MyAppState extends State<MyApp> {
|
|||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.play_arrow),
|
||||
icon: const Icon(Icons.play_arrow),
|
||||
onPressed: start,
|
||||
),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <texture_rgba_renderer/texture_rgba_renderer_plugin.h>
|
||||
#include <flutter_texture_rgba_renderer/texture_rgba_renderer_plugin.h>
|
||||
|
||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) texture_rgba_renderer_registrar =
|
||||
g_autoptr(FlPluginRegistrar) flutter_texture_rgba_renderer_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "TextureRgbaRendererPlugin");
|
||||
texture_rgba_renderer_plugin_register_with_registrar(texture_rgba_renderer_registrar);
|
||||
texture_rgba_renderer_plugin_register_with_registrar(flutter_texture_rgba_renderer_registrar);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
texture_rgba_renderer
|
||||
flutter_texture_rgba_renderer
|
||||
)
|
||||
|
||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import texture_rgba_renderer
|
||||
import flutter_texture_rgba_renderer
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
TextureRgbaRendererPlugin.register(with: registry.registrar(forPlugin: "TextureRgbaRendererPlugin"))
|
||||
|
|
|
|||
|
|
@ -75,6 +75,13 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_texture_rgba_renderer:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "0.0.1"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -184,13 +191,6 @@ packages:
|
|||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.4.16"
|
||||
texture_rgba_renderer:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "0.0.1"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ dependencies:
|
|||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
texture_rgba_renderer:
|
||||
flutter_texture_rgba_renderer:
|
||||
# When depending on this package from a real application you should use:
|
||||
# texture_rgba_renderer: ^x.y.z
|
||||
# flutter_texture_rgba_renderer: ^x.y.z
|
||||
# See https://dart.dev/tools/pub/dependencies#version-constraints
|
||||
# The example app is bundled with the plugin so we use a path dependency on
|
||||
# the parent directory to use the current plugin's version.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <texture_rgba_renderer/texture_rgba_renderer_plugin_c_api.h>
|
||||
#include <flutter_texture_rgba_renderer/texture_rgba_renderer_plugin_c_api.h>
|
||||
|
||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
TextureRgbaRendererPluginCApiRegisterWithRegistrar(
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
texture_rgba_renderer
|
||||
flutter_texture_rgba_renderer
|
||||
)
|
||||
|
||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:texture_rgba_renderer/texture_rgba_renderer_method_channel.dart';
|
||||
import 'package:flutter_texture_rgba_renderer/texture_rgba_renderer_method_channel.dart';
|
||||
|
||||
void main() {
|
||||
MethodChannelTextureRgbaRenderer platform =
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:texture_rgba_renderer/texture_rgba_renderer.dart';
|
||||
import 'package:texture_rgba_renderer/texture_rgba_renderer_platform_interface.dart';
|
||||
import 'package:texture_rgba_renderer/texture_rgba_renderer_method_channel.dart';
|
||||
import 'package:flutter_texture_rgba_renderer/texture_rgba_renderer_platform_interface.dart';
|
||||
import 'package:flutter_texture_rgba_renderer/texture_rgba_renderer_method_channel.dart';
|
||||
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
|
||||
|
||||
class MockTextureRgbaRendererPlatform
|
||||
|
|
@ -9,6 +10,16 @@ class MockTextureRgbaRendererPlatform
|
|||
implements TextureRgbaRendererPlatform {
|
||||
@override
|
||||
Future<String?> getPlatformVersion() => Future.value('42');
|
||||
|
||||
@override
|
||||
Future<bool> closeTexture(int key) => Future.value(true);
|
||||
|
||||
@override
|
||||
Future<int> createTexture(int key) => Future.value(1);
|
||||
|
||||
@override
|
||||
Future<bool> onRgba(int key, Uint8List data, int height, int width) =>
|
||||
Future.value(true);
|
||||
}
|
||||
|
||||
void main() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue