first commit
This commit is contained in:
41
lib/src/widgets/tabs.dart
Normal file
41
lib/src/widgets/tabs.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rich_editor/constants.dart';
|
||||
import 'package:rich_editor/src/models/button.dart';
|
||||
import 'package:rich_editor/src/widgets/tab_button.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
|
||||
class GroupedTab extends StatelessWidget {
|
||||
final WebViewController? controller;
|
||||
|
||||
GroupedTab({this.controller});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Color(0xff424242),
|
||||
height: 59.0,
|
||||
child: Column(
|
||||
children: [
|
||||
Flexible(
|
||||
child: ListView(
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: [
|
||||
for(Button button in buttons)
|
||||
InkWell(
|
||||
onTap: () {
|
||||
print('BOLDDD');
|
||||
controller?.evaluateJavascript('setBold()');
|
||||
},
|
||||
child: TabButton(
|
||||
icon: button.icon,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user