[cleanup] remove unused text_input_mod
Change-Id: I96432b2a67221938bb3224fe445b8b7525a449b9
diff --git a/bin/ui/text_input_mod/BUILD.gn b/bin/ui/text_input_mod/BUILD.gn
deleted file mode 100644
index 73425f0..0000000
--- a/bin/ui/text_input_mod/BUILD.gn
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2018 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//topaz/runtime/flutter_runner/flutter_app.gni")
-
-flutter_app("text_input_mod") {
- main_dart = "lib/main.dart"
- package_name = "text_input_mod"
-
- fuchsia_package_name = "text_input_mod"
-
- sources = []
- deps = [
- "//third_party/dart-pkg/git/flutter/packages/flutter",
- "//topaz/bin/ui/text_input_mod/public/fidl:fuchsia.textinputmod",
- "//topaz/public/dart/fidl",
- "//topaz/public/dart/fuchsia_logger",
- "//topaz/public/dart/fuchsia_modular",
- "//topaz/public/dart/widgets:lib.widgets",
- "//topaz/public/dart/widgets:lib.widgets",
- "//topaz/public/lib/app/dart",
- "//topaz/public/lib/module/dart",
- "//topaz/public/lib/module_resolver/dart",
- "//topaz/public/lib/widgets/dart",
- ]
-
- meta = [
- {
- path = rebase_path("meta/text_input_mod.cmx")
- dest = "text_input_mod.cmx"
- },
- ]
-}
diff --git a/bin/ui/text_input_mod/README.md b/bin/ui/text_input_mod/README.md
deleted file mode 100644
index 2c2d604..0000000
--- a/bin/ui/text_input_mod/README.md
+++ /dev/null
@@ -1 +0,0 @@
-A simple module which shows a text input
\ No newline at end of file
diff --git a/bin/ui/text_input_mod/analysis_options.yaml b/bin/ui/text_input_mod/analysis_options.yaml
deleted file mode 100644
index f0cea8a..0000000
--- a/bin/ui/text_input_mod/analysis_options.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-# Copyright 2018 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-include: ../../../tools/analysis_options.yaml
diff --git a/bin/ui/text_input_mod/lib/main.dart b/bin/ui/text_input_mod/lib/main.dart
deleted file mode 100644
index 3bf4135..0000000
--- a/bin/ui/text_input_mod/lib/main.dart
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright 2018 The Fuchsia Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-import 'dart:async';
-
-import 'package:fidl/fidl.dart';
-import 'package:flutter/material.dart';
-import 'package:fidl_fuchsia_textinputmod/fidl_async.dart';
-import 'package:lib.app.dart/app_async.dart';
-
-class ErmineTextInputMod extends TextInputMod {
- TextInputModReceiverProxy textInputModReceiverProxy;
- Completer completer;
- void sendData(String text) {
- if (completer != null) {
- textInputModReceiverProxy.userEnteredText(text).then((_) {
- completer.complete();
- });
- }
- }
-
- void cancel() {
- if (completer != null) {
- textInputModReceiverProxy.userCanceled().then((_) {
- completer.complete();
- });
- }
- }
-
- @override
- Future<void> listenForTextInput(
- InterfaceHandle<TextInputModReceiver> receiver) {
- textInputModReceiverProxy = TextInputModReceiverProxy();
-
- textInputModReceiverProxy.ctrl.bind(receiver);
- completer = Completer<void>();
-
- return completer.future;
- }
-}
-
-void main() {
- TextInputMod textInputMod = ErmineTextInputMod();
-
- StartupContext startupContext = StartupContext.fromStartupInfo();
-
- startupContext.outgoingServices.addServiceForName(
- (InterfaceRequest<TextInputMod> request) {
- TextInputModBinding().bind(textInputMod, request);
- },
- TextInputMod.$serviceName,
- );
-
- ValueNotifier<String> text = ValueNotifier('null');
-
- final FocusNode focusNode = FocusNode();
-
- runApp(MyApp(focusNode: focusNode, textInputMod: textInputMod, text: text));
-}
-
-class MyApp extends StatelessWidget {
- final FocusNode focusNode;
- final ErmineTextInputMod textInputMod;
- final ValueNotifier<String> text;
-
- /// Constructor
- const MyApp({
- @required this.focusNode,
- @required this.textInputMod,
- @required this.text,
- Key key,
- }) : super(key: key);
-
- @override
- Widget build(BuildContext context) {
- FocusScope.of(context).requestFocus(
- focusNode,
- );
- return MaterialApp(
- title: 'text input',
- theme: ThemeData(
- primarySwatch: Colors.blue,
- ),
- home: Scaffold(
- backgroundColor: Colors.blueGrey,
- body: Container(
- child: Center(
- child: Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- Container(
- padding: EdgeInsets.all(5),
- child: IconButton(
- icon: Icon(Icons.cancel),
- iconSize: 30,
- color: Colors.grey[100],
- disabledColor: Colors.grey[500],
- onPressed: textInputMod.cancel,
- ),
- ),
- Flexible(
- child: TextField(
- focusNode: focusNode,
- onChanged: (v) {
- text.value = v;
- },
- onSubmitted: textInputMod.sendData,
- decoration: InputDecoration(hintText: 'Enter Mod URL'),
- ),
- ),
- Container(
- padding: EdgeInsets.all(5),
- child: IconButton(
- icon: Icon(Icons.send),
- iconSize: 30,
- color: Colors.grey[100],
- disabledColor: Colors.grey[500],
- onPressed: () {
- textInputMod.sendData(text.value);
- },
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- );
- }
-}
diff --git a/bin/ui/text_input_mod/manifest.json b/bin/ui/text_input_mod/manifest.json
deleted file mode 100644
index 06ea4de..0000000
--- a/bin/ui/text_input_mod/manifest.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "@version": 2,
- "binary": "text_input_mod",
- "suggestion_headline": "Show a text input",
- "intent_filters": []
-}
\ No newline at end of file
diff --git a/bin/ui/text_input_mod/meta/text_input_mod.cmx b/bin/ui/text_input_mod/meta/text_input_mod.cmx
deleted file mode 100644
index 16bb78f..0000000
--- a/bin/ui/text_input_mod/meta/text_input_mod.cmx
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "program": {
- "data": "data/text_input_mod"
- },
- "sandbox": {
- "services": [
- "fuchsia.fonts.Provider",
- "fuchsia.sys.Environment",
- "fuchsia.logger.LogSink",
- "fuchsia.cobalt.LoggerFactory",
- "fuchsia.modular.ContextWriter",
- "fuchsia.ui.scenic.Scenic",
- "fuchsia.ui.input.ImeService",
- "fuchsia.ui.policy.Presenter",
- "fuchsia.modular.Clipboard",
- "fuchsia.modular.ComponentContext",
- "fuchsia.modular.ModuleContext",
- "fuchsia.textinputmod.TextInputModReceiver"
- ]
- }
-}
diff --git a/bin/ui/text_input_mod/public/fidl/BUILD.gn b/bin/ui/text_input_mod/public/fidl/BUILD.gn
deleted file mode 100644
index f4c5987..0000000
--- a/bin/ui/text_input_mod/public/fidl/BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright 2018 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//build/fidl/fidl.gni")
-
-fidl("fuchsia.textinputmod") {
- sources = [
- "textinputmod.fidl",
- ]
-}
diff --git a/bin/ui/text_input_mod/public/fidl/textinputmod.fidl b/bin/ui/text_input_mod/public/fidl/textinputmod.fidl
deleted file mode 100644
index 13abe7b..0000000
--- a/bin/ui/text_input_mod/public/fidl/textinputmod.fidl
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2018 The Fuchsia Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-library fuchsia.textinputmod;
-
-[Discoverable]
-protocol TextInputModReceiver {
- UserEnteredText(string text) -> ();
- UserCanceled() -> ();
-};
-
-[Discoverable]
-protocol TextInputMod {
- ListenForTextInput(TextInputModReceiver receiver) -> ();
-};
diff --git a/bin/ui/text_input_mod/pubspec.yaml b/bin/ui/text_input_mod/pubspec.yaml
deleted file mode 100644
index de784fc..0000000
--- a/bin/ui/text_input_mod/pubspec.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-# Copyright 2018 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
diff --git a/packages/prod/BUILD.gn b/packages/prod/BUILD.gn
index 9cddb5e..0eb5474 100644
--- a/packages/prod/BUILD.gn
+++ b/packages/prod/BUILD.gn
@@ -69,7 +69,6 @@
"//topaz/packages/prod:skottie_viewer",
"//topaz/packages/prod:system_dashboard",
"//topaz/packages/prod:term",
- "//topaz/packages/prod:text_input_mod",
"//topaz/packages/prod:userpicker_base_shell",
"//topaz/packages/prod:web_runner",
"//topaz/packages/prod:wifi_settings",
@@ -84,13 +83,6 @@
]
}
-group("text_input_mod") {
- testonly = true
- public_deps = [
- "//topaz/bin/ui/text_input_mod",
- ]
-}
-
group("flutter_aot") {
testonly = true
public_deps = [