2023-08-14 13:34:01 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import 'package:appflowy/generated/flowy_svgs.g.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-26 16:27:17 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import 'package:appflowy/generated/locale_keys.g.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-20 23:48:34 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import 'package:appflowy/plugins/database_view/tar_bar/tab_bar_view.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-26 16:27:17 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import 'package:appflowy/startup/plugin/plugin.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2022-05-17 20:25:35 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import 'package:easy_localization/easy_localization.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-04 08:41:16 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-04 08:22:49 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-06 09:03:02 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class GridPluginBuilder implements PluginBuilder {
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-04 08:22:49 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  @override
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  Plugin build(dynamic data) {
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-19 14:11:29 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    if (data is ViewPB) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-20 23:48:34 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      return DatabaseTabBarViewPlugin(pluginType: pluginType, view: data);
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-04 08:22:49 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    } else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      throw FlowyPluginException.invalidData;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  @override
							 | 
						
					
						
							
								
									
										
										
										
											2022-05-17 20:25:35 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  String get menuName => LocaleKeys.grid_menuName.tr();
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-04 08:22:49 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-15 11:45:23 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  @override
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-14 13:34:01 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  FlowySvgData get icon => FlowySvgs.grid_s;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-15 11:45:23 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-04 08:22:49 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  @override
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-18 19:32:08 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PluginType get pluginType => PluginType.grid;
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-06 09:03:02 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-10 17:59:28 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  @override
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-04 14:08:50 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ViewLayoutPB? get layoutType => ViewLayoutPB.Grid;
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-04 08:22:49 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								class GridPluginConfig implements PluginConfig {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  @override
							 | 
						
					
						
							
								
									
										
										
										
											2022-04-08 14:31:33 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  bool get creatable => true;
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-04 08:22:49 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |